/* =================================================================
   ELECTROHUB DASHBOARD STYLES
   Modern, Responsive Dashboard with Glassmorphism
   ================================================================= */

/* =================================================================
   CSS VARIABLES
   ================================================================= */
:root {
    /* Colors */
    --primary-dark: #020617;
    --primary-blue: #2563EB;
    --accent-cyan: #22D3EE;
    --bg-dark: #0F172A;
    --bg-light: #F8FAFC;
    --text-light: #F1F5F9;
    --text-dark: #1E293B;
    --text-gray: #94A3B8;
    
    /* Dashboard Specific */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 70px;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #020617, #2563EB);
    --gradient-accent: linear-gradient(135deg, #2563EB, #22D3EE);
    --gradient-success: linear-gradient(135deg, #10B981, #059669);
    --gradient-warning: linear-gradient(135deg, #F59E0B, #D97706);
    --gradient-danger: linear-gradient(135deg, #EF4444, #DC2626);
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* =================================================================
   RESET & BASE STYLES
   ================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
}

/* =================================================================
   DASHBOARD LAYOUT
   ================================================================= */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Decorative Background */
.dashboard-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* =================================================================
   SIDEBAR
   ================================================================= */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #020617 0%, #0F172A 100%);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: all var(--transition-normal);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar Logo */
.sidebar-logo {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 85px;
}

.sidebar-logo .logo-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: linear-gradient(135deg, #2563EB, #22D3EE);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.sidebar-logo .logo-text {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.sidebar-logo .logo-text h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logo .logo-text p {
    font-size: 10px;
    color: var(--accent-cyan);
    margin: 4px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 25px 15px;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-section-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 15px;
    margin-bottom: 12px;
}

.menu-item {
    margin-bottom: 6px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 15px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    font-size: 15px;
    font-weight: 500;
}

.menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #2563EB, #22D3EE);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.menu-link i {
    font-size: 19px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.menu-link span {
    flex: 1;
    transition: all var(--transition-normal);
}

.menu-badge {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Menu Link Hover - Unique & Attractive */
.menu-link:hover {
    background: rgba(37, 99, 235, 0.15);
    color: white;
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.menu-link:hover::before {
    transform: scaleY(1);
}

.menu-link:hover i {
    transform: scale(1.2) rotate(5deg);
    color: var(--accent-cyan);
}

/* Active Menu Link */
.menu-link.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(34, 211, 238, 0.1));
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

.menu-link.active::before {
    transform: scaleY(1);
}

.menu-link.active i {
    color: var(--accent-cyan);
    animation: iconPulse 2s ease infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Dropdown Menu */
.menu-dropdown {
    position: relative;
}

.menu-dropdown .menu-link .dropdown-arrow {
    margin-left: auto;
    font-size: 14px;
    transition: transform var(--transition-normal);
}

.menu-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    padding-left: 20px;
}

.menu-dropdown.active .submenu {
    max-height: 500px;
}

.submenu-item {
    margin: 4px 0;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition-normal);
    position: relative;
}

.submenu-link::before {
    content: '';
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.submenu-link:hover {
    background: rgba(37, 99, 235, 0.1);
    color: white;
    padding-left: 20px;
}

.submenu-link:hover::before {
    background: var(--accent-cyan);
    transform: scale(1.5);
}

.submenu-link.active {
    background: rgba(37, 99, 235, 0.15);
    color: white;
}

.submenu-link.active::before {
    background: var(--accent-cyan);
}

/* Sidebar User */
.sidebar-user {
    padding: 20px;
    margin: 15px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.sidebar-user::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 70%);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB, #22D3EE);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    border: 3px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.user-details h4 {
    font-size: 15px;
    color: white;
    margin: 0 0 3px 0;
    font-weight: 600;
}

.user-details p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Toggle Sidebar Button */
.sidebar-toggle {
    position: absolute;
    top: 25px;
    right: -0px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #2563EB, #22D3EE);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    transition: all var(--transition-normal);
    z-index: 10;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

/* Collapsed Sidebar */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-logo .logo-text,
.sidebar.collapsed .menu-section-title,
.sidebar.collapsed .menu-link span,
.sidebar.collapsed .menu-badge,
.sidebar.collapsed .user-details,
.sidebar.collapsed .dropdown-arrow {
    opacity: 0;
    visibility: hidden;
}

.sidebar.collapsed .menu-link {
    justify-content: center;
}

.sidebar.collapsed .sidebar-user {
    padding: 15px;
}

.sidebar.collapsed .user-info {
    justify-content: center;
}

/* =================================================================
   MAIN CONTENT
   ================================================================= */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
    max-width: 100%;
    overflow-x: hidden;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* =================================================================
   TOPBAR
   ================================================================= */
.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid #E2E8F0;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

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

.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.mobile-menu-toggle:hover {
    background: var(--primary-blue);
    color: white;
}

.page-title {
    margin: 0;
}

.page-title h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1;
}

.page-title p {
    font-size: 14px;
    color: var(--text-gray);
    margin: 5px 0 0 0;
}

/* Topbar Search */
.topbar-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.topbar-search input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 15px;
    background: var(--bg-light);
    transition: all var(--transition-normal);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.topbar-search .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 16px;
}

.topbar-search .clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 5px;
    display: none;
}

.topbar-search input:not(:placeholder-shown) ~ .clear-search {
    display: block;
}

/* Topbar Right */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-action {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: none;
    border-radius: 10px;
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal);
}

.topbar-action:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.topbar-action .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-light);
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.user-dropdown-toggle:hover {
    border-color: var(--primary-blue);
}

.user-dropdown-toggle .user-avatar-small {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB, #22D3EE);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    font-weight: 600;
}

.user-dropdown-toggle .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.user-dropdown-toggle i {
    font-size: 12px;
    color: var(--text-gray);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid #E2E8F0;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 1000;
}

.user-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition-normal);
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    color: var(--text-gray);
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

.dropdown-item:hover i {
    color: var(--primary-blue);
}

.dropdown-divider {
    height: 1px;
    background: #E2E8F0;
    margin: 8px 0;
}

.dropdown-item.logout {
    color: #EF4444;
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* =================================================================
   DASHBOARD CONTENT
   ================================================================= */
.dashboard-content {
    padding: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #E2E8F0;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-accent);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(34, 211, 238, 0.1));
    border-radius: 12px;
    font-size: 24px;
    color: var(--primary-blue);
}

.stat-card.success .stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: #10B981;
}

.stat-card.warning .stat-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    color: #F59E0B;
}

.stat-card.danger .stat-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    color: #EF4444;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.stat-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.stat-title {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
    line-height: 1;
}

.stat-subtitle {
    font-size: 13px;
    color: var(--text-gray);
}

/* =================================================================
   CARDS & TABLES
   ================================================================= */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #E2E8F0;
    margin-bottom: 25px;
    padding: 25px;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 15px;
}

.card-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.card-body {
    width: 100%;
}

/* Buttons */
.btn-action {
    padding: 10px 20px;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-action i {
    font-size: 14px;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead {
    background: var(--bg-light);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #E2E8F0;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #E2E8F0;
    font-size: 14px;
    color: var(--text-dark);
}

.data-table tbody tr {
    transition: all var(--transition-fast);
}

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

.member-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-cell img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.member-cell strong {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.member-cell span {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
}

.level-badge,
.rank-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.level-badge {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
}

.rank-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

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

.rank-badge.silver {
    background: linear-gradient(135deg, #94A3B8, #64748B);
    color: white;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: white;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

/* =================================================================
   RESPONSIVE DESIGN - MOBILE & WEB
   ================================================================= */

/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-row {
        grid-template-columns: 1fr !important;
    }
    
    .dashboard-content {
        padding: 25px;
        max-width: 100%;
    }
    
    .card-header {
        flex-wrap: wrap;
    }
    
    .btn-action {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    :root {
        font-size: 15px;
        --sidebar-width: 260px;
    }
    
    .topbar {
        padding: 0 20px;
    }
    
    .dashboard-content {
        padding: 25px 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .page-title h1 {
        font-size: 24px;
    }
    
    .topbar-search {
        max-width: 300px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    :root {
        font-size: 16px;
        --sidebar-width: 280px;
    }
    
    /* Sidebar Mobile */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        max-width: 85vw;
        box-shadow: none;
    }
    
    .sidebar.mobile-active {
        transform: translateX(0);
        z-index: 1001;
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar-logo {
        padding: 18px 15px;
    }
    
    .sidebar-logo .logo-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 20px;
    }
    
    .sidebar-logo .logo-text h2 {
        font-size: 18px;
    }
    
    .sidebar-menu {
        padding: 20px 12px;
    }
    
    .menu-link {
        padding: 15px;
        font-size: 16px;
    }
    
    .menu-link i {
        font-size: 20px;
    }
    
    /* Mobile Menu Overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Table Wrapper for Better Scrolling */
    .table-responsive {
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .topbar {
        padding: 0 15px;
        height: 65px;
    }
    
    .page-title h1 {
        font-size: 20px;
    }
    
    .page-title p {
        font-size: 13px;
    }
    
    .topbar-search {
        display: none;
    }
    
    .topbar-action {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .topbar-action .badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }
    
    .user-dropdown-toggle {
        padding: 6px 10px;
    }
    
    .user-dropdown-toggle .user-avatar-small {
        width: 36px;
        height: 36px;
    }
    
    .user-dropdown-toggle .user-name {
        display: none;
    }
    
    .user-dropdown-toggle i {
        display: none;
    }
    
    .dropdown-menu {
        right: 0;
        min-width: 200px;
    }
    
    .dashboard-content {
        padding: 20px 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    /* Cards and Tables */
    .card {
        padding: 20px 15px;
        margin-bottom: 20px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .card-header {
        flex-wrap: wrap;
    }
    
    .card-header h3 {
        font-size: 18px;
        width: 100%;
    }
    
    .card-header > div {
        width: 100%;
        margin-top: 12px;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .card-header > div .btn-action {
        flex: 1;
        min-width: 140px;
        justify-content: center;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    table {
        min-width: 800px;
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 10px;
        white-space: nowrap;
    }
    
    /* Content Rows */
    .content-row {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 20px;
    }
    
    .btn,
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* Activity and Lists */
    .activity-list,
    .team-list,
    .product-grid {
        gap: 15px;
    }
    
    .activity-item {
        padding: 15px;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    :root {
        font-size: 15px;
    }
    
    .sidebar {
        width: 260px;
    }
    
    .sidebar-logo {
        padding: 15px 12px;
    }
    
    .sidebar-logo .logo-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 18px;
    }
    
    .sidebar-logo .logo-text h2 {
        font-size: 16px;
    }
    
    .topbar {
        height: 60px;
        padding: 0 12px;
    }
    
    .topbar-left {
        gap: 10px;
    }
    
    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .page-title h1 {
        font-size: 18px;
    }
    
    .page-title p {
        font-size: 12px;
    }
    
    .topbar-right {
        gap: 8px;
    }
    
    .topbar-action {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    .user-dropdown-toggle .user-avatar-small {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .dashboard-content {
        padding: 15px 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .stat-card {
        padding: 18px 15px;
        width: 100%;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 26px;
    }
    
    .stat-title {
        font-size: 13px;
    }
    
    .stat-subtitle {
        font-size: 12px;
    }
    
    .card {
        padding: 15px 12px;
        width: 100%;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-header h3 {
        font-size: 16px;
        width: 100%;
    }
    
    .card-header > div {
        width: 100%;
    }
    
    .card-header > div .btn-action {
        width: 100%;
        flex: 1;
    }
    
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-action {
        padding: 10px 16px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .dropdown-menu {
        min-width: 180px;
    }
    
    .dropdown-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar {
        max-width: 70vw;
    }
}

/* Large Screens */
@media (min-width: 1400px) {
    :root {
        font-size: 17px;
    }
    
    .dashboard-content {
        padding: 35px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* Extra Large Screens */
@media (min-width: 1920px) {
    .main-content {
        max-width: 1800px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .dashboard-content {
        padding: 40px;
    }
}

/* =================================================================
   MOBILE APP FLOATING BUTTON
   ================================================================= */
.mobile-app-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.5);
    z-index: 9999;
    transition: all 0.3s ease;
    animation: floatPulse 3s ease-in-out infinite;
}

.mobile-app-float-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 48px rgba(37, 99, 235, 0.6);
}

.mobile-app-float-btn i {
    font-size: 28px;
    margin-bottom: 2px;
}

.mobile-app-float-btn span {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes floatPulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 8px 32px rgba(37, 99, 235, 0.5);
    }
    50% {
        transform: translateY(-8px);
        box-shadow: 0 12px 40px rgba(37, 99, 235, 0.6);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-app-float-btn {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .mobile-app-float-btn i {
        font-size: 24px;
    }
    
    .mobile-app-float-btn span {
        font-size: 8px;
    }
}

