/* ===== ADMIN DASHBOARD UNIFIED STYLES ===== */
/* Complete CSS for Admin Dashboard Layout and Components */

/* ===== FLASH MESSAGE HIDDEN ===== */
.flash-message-hidden {
    display: none !important;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.toast {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.toast-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin: 0;
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #6b7280;
}

.toast-body {
    padding: 0.5rem 1.25rem 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Toast Types */
.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        margin-bottom: 0.75rem;
    }

    .toast-header {
        padding: 0.75rem 1rem 0.5rem;
    }

    .toast-body {
        padding: 0.5rem 1rem 0.75rem;
    }
}

/* ===== ADMIN TABS ===== */
.admin-tab-panel-hidden {
    display: none !important;
}

.admin-tab-panel:not(.admin-tab-panel-hidden) {
    display: block !important;
}

/* Settings Page Tabs */
.admin-settings-page .admin-tab-panel {
    display: none;
}

.admin-settings-page .admin-tab-panel:not(.admin-tab-panel-hidden) {
    display: block !important;
}

/* Root Variables */

.toast {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.toast-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin: 0;
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #6b7280;
}

.toast-body {
    padding: 0.5rem 1.25rem 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Toast Types */
.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        margin-bottom: 0.75rem;
    }

    .toast-header {
        padding: 0.75rem 1rem 0.5rem;
    }

    .toast-body {
        padding: 0.5rem 1rem 0.75rem;
    }
}

/* Root Variables */
:root {
    /* Primary Colors */
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #eef2ff;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #1e293b;
    --bg-darker: #0f172a;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-dark: #334155;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-info: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    
    /* Layout Dimensions */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 64px;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --bg-primary: #1e293b;
        --bg-secondary: #0f172a;
        --bg-tertiary: #334155;
        --border-color: #334155;
        --border-light: #475569;
    }
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    margin: 0;
    padding: 0;
}

body.admin-page {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Layout Components */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Sidebar Overlay for Mobile */
#admin-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    display: none;
}

#admin-sidebar-overlay.open {
    display: block;
}

/* Sidebar */
#admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-dark);
    border-right: 1px solid var(--border-dark);
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Desktop Sidebar - Force visible */
@media (min-width: 1024px) {
    #admin-sidebar {
        position: relative !important;
        transform: translateX(0) !important;
        width: var(--sidebar-width) !important;
        min-width: var(--sidebar-width) !important;
        height: 100vh !important;
        flex-shrink: 0;
        display: flex !important;
        flex-direction: column;
    }
}

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

/* Sidebar Header */
.admin-sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-dark);
    background: var(--bg-darker);
}

.admin-sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-decoration: none;
    color: var(--text-white);
}

.admin-sidebar-logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.admin-sidebar-logo-icon:hover {
    transform: scale(1.05);
}

.admin-sidebar-logo-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.admin-sidebar-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
}

.admin-sidebar-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Sidebar Navigation */
.admin-sidebar-nav {
    flex: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.admin-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

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

.admin-sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 2px;
}

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

.nav-section {
    margin-bottom: var(--spacing-lg);
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-md);
    padding: 0 var(--spacing-sm);
}

.nav-section-title::after {
    content: '';
    display: block;
    height: 1px;
    background: var(--border-dark);
    margin-top: var(--spacing-sm);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-sm);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.admin-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.admin-nav-item:hover::before {
    left: 100%;
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    transform: translateX(4px);
}

.admin-nav-item.active {
    background: var(--primary-color);
    color: var(--text-white);
    font-weight: 600;
}

.admin-nav-item.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1.5rem;
    background: var(--text-white);
    border-radius: 2px 0 0 2px;
}

.admin-nav-item-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.admin-nav-item-text {
    flex: 1;
    font-size: 0.875rem;
}

/* Sidebar Footer */
.admin-sidebar-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-dark);
    background: var(--bg-darker);
}

.admin-logout-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
    padding: var(--spacing-md);
    background: transparent;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
}

.admin-logout-btn:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
    transform: translateY(-1px);
}

/* Main Content Area */
.admin-main {
    flex: 1;
    margin-left: 0;
    background: var(--bg-secondary);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Desktop Main Content */
@media (min-width: 1024px) {
    .admin-main {
        flex: 1;
        margin-left: 0;
        width: calc(100% - var(--sidebar-width));
        min-width: 0;
    }
}

/* Topbar */
.admin-topbar {
    position: sticky !important;
    top: 0 !important;
    height: var(--topbar-height) !important;
    background: var(--bg-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 var(--spacing-lg) !important;
    box-shadow: var(--shadow-sm) !important;
    width: 100% !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.admin-topbar-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.admin-topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: var(--spacing-md) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.admin-topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: var(--spacing-md) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.admin-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.admin-menu-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-primary);
}

.admin-topbar-title {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* User Menu */
.admin-user-menu {
    position: relative;
}

.admin-user-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-primary);
    text-decoration: none;
}

.admin-user-btn:hover {
    background: var(--bg-tertiary);
}

.admin-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.admin-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.admin-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.admin-user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* Dropdowns */
.admin-user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--spacing-sm);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 12rem;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
}

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

.admin-user-menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.admin-user-menu-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.admin-user-menu-item.danger {
    color: var(--danger-color);
}

.admin-user-menu-item.danger:hover {
    background: #fef2f2;
    color: var(--danger-color);
}

/* Language Switcher */
.admin-language-switcher {
    position: relative;
}

.admin-language-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-primary);
    text-decoration: none;
}

.admin-language-btn:hover {
    background: var(--bg-tertiary);
}

.admin-language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--spacing-sm);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 10rem;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
}

.admin-language-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-language-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.admin-language-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.admin-language-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Page Layout */
.admin-page {
    padding: var(--spacing-xl);
    min-height: calc(100vh - var(--topbar-height));
}

.admin-main-content {
    padding: var(--spacing-xl);
    max-width: 100%;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Page Header */
.admin-page-header {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
}

.admin-page-header-content {
    padding: var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.admin-page-title h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.admin-page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.admin-page-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Modern Header */
.modern-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(79, 70, 229, 0.1);
    position: relative;
    overflow: hidden;
}

.modern-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

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

.header-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-online {
    color: var(--success-color);
}

.status-offline {
    color: var(--danger-color);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.dashboard-grid-1 {
    grid-template-columns: 1fr;
}

.dashboard-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.dashboard-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Stats Cards */
.stats-grid-enhanced {
    position: relative;
}

.stats-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.stats-card-primary::before {
    background: var(--gradient-primary);
}

.stats-card-success::before {
    background: var(--gradient-success);
}

.stats-card-warning::before {
    background: var(--gradient-warning);
}

.stats-card-danger::before {
    background: var(--gradient-danger);
}

.stats-card-info::before {
    background: var(--gradient-info);
}

.stats-card-neutral::before {
    background: linear-gradient(90deg, #6b7280, #9ca3af);
}

.stats-card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    background: var(--gradient-primary);
}

.stats-card-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0.1) 0px, rgba(0,0,0,0.1) 1px, transparent 1px, transparent 20px);
}

.stats-card-content {
    position: relative;
    z-index: 1;
}

.stats-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stats-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
}

.stats-card-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.stats-card-primary .stats-card-icon {
    background: var(--gradient-primary);
}

.stats-card-success .stats-card-icon {
    background: var(--gradient-success);
}

.stats-card-warning .stats-card-icon {
    background: var(--gradient-warning);
}

.stats-card-danger .stats-card-icon {
    background: var(--gradient-danger);
}

.stats-card-info .stats-card-icon {
    background: var(--gradient-info);
}

.stats-card-neutral .stats-card-icon {
    background: linear-gradient(90deg, #6b7280, #9ca3af);
}

.stats-card-menu {
    opacity: 0;
    transition: var(--transition-fast);
}

.stats-card:hover .stats-card-menu {
    opacity: 1;
}

.stats-menu-btn {
    width: 2rem;
    height: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.stats-menu-btn:hover {
    background: var(--bg-tertiary);
}

.stats-menu-btn svg {
    width: 1rem;
    height: 1rem;
    color: var(--text-secondary);
}

.stats-card-body {
    margin-bottom: 1rem;
}

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

.stats-card-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stats-card-subvalue {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.stats-card-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.stats-card-trend.positive {
    color: var(--success-color);
}

.stats-card-trend.negative {
    color: var(--danger-color);
}

.stats-trend-icon {
    width: 1rem;
    height: 1rem;
}

/* Admin Cards */
.admin-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: var(--spacing-xl);
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.admin-card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.admin-card-content {
    padding: 2rem;
}

.admin-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.admin-card-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Quick Actions */
.quick-actions-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: var(--spacing-xl);
}

.quick-actions-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.quick-actions-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    margin-right: 1rem;
}

.quick-actions-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::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;
}

.quick-action-btn:hover::before {
    left: 100%;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.quick-action-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
}

.quick-action-btn:hover .quick-action-icon {
    transform: scale(1.1) rotate(5deg);
}

.quick-action-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.quick-action-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quick-action-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.quick-action-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.quick-action-arrow {
    opacity: 0;
    transition: var(--transition-fast);
}

.quick-action-btn:hover .quick-action-arrow {
    opacity: 1;
}

.quick-action-arrow svg {
    width: 1rem;
    height: 1rem;
    color: var(--text-muted);
}

.quick-action-btn.primary .quick-action-icon {
    background: var(--gradient-primary);
}

.quick-action-btn.success .quick-action-icon {
    background: var(--gradient-success);
}

.quick-action-btn.warning .quick-action-icon {
    background: var(--gradient-warning);
}

.quick-action-btn.info .quick-action-icon {
    background: var(--gradient-info);
}

/* Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.admin-btn::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;
}

.admin-btn:hover::before {
    left: 100%;
}

.admin-btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.admin-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.admin-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.admin-btn-secondary:hover {
    background: var(--bg-secondary);
}

.admin-btn-success {
    background: var(--gradient-success);
    color: white;
}

.admin-btn-warning {
    background: var(--gradient-warning);
    color: white;
}

.admin-btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.admin-btn-info {
    background: var(--gradient-info);
    color: white;
}

.admin-btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.admin-btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.admin-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.admin-btn-m {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

.admin-btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

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

/* Status Badges */
.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.admin-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.admin-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.admin-badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Form Elements */
.admin-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.admin-form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Search Box Styles */
.admin-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-search-box input {
    padding-right: 2.5rem;
}

.admin-search-icon {
    position: absolute;
    right: 0.75rem;
    color: #6b7280;
    pointer-events: none;
    z-index: 10;
}

.admin-search-box input:focus + .admin-search-icon {
    color: var(--primary-color);
}

/* Enhanced Stats Cards */
.stats-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stats-card:hover::before {
    transform: scaleX(1);
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(79, 70, 229, 0.2);
}

.stats-card .card-body {
    position: relative;
    z-index: 2;
}

.stats-icon {
    transition: all 0.3s ease;
    position: relative;
}

.stats-card:hover .stats-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stats-card:hover .stats-icon i {
    animation: pulse 0.6s ease-in-out;
}

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

/* Enhanced Card Body */
.card-body {
    transition: all 0.3s ease;
}

.stats-card:hover .card-body {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
}

/* Improved Spacing */
.mb-6 {
    margin-bottom: 3.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mb-4 {
    margin-bottom: 2.5rem !important;
}

.mb-3 {
    margin-bottom: 2rem !important;
}

.mb-2 {
    margin-bottom: 1.5rem !important;
}

.mb-1 {
    margin-bottom: 1rem !important;
}

.me-1 {
    margin-right: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.me-3 {
    margin-right: 0.75rem !important;
}

.mt-0\.5 {
    margin-top: 0.125rem !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

/* Text Colors */
.text-gray-500 {
    color: #6b7280 !important;
}

.text-blue-500 {
    color: #3b82f6 !important;
}

.text-purple-500 {
    color: #8b5cf6 !important;
}

.text-green-500 {
    color: #10b981 !important;
}

.text-orange-500 {
    color: #f97316 !important;
}

.text-red-500 {
    color: #ef4444 !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: #10b981 !important;
}

.text-danger {
    color: #ef4444 !important;
}

.text-info {
    color: #06b6d4 !important;
}

.text-warning {
    color: #f59e0b !important;
}

.text-muted {
    color: #6b7280 !important;
}

.text-dark {
    color: #1f2937 !important;
}

/* Font Weights */
.fw-semibold {
    font-weight: 600 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

/* Font Sizes */
.fs-4 {
    font-size: 1.5rem !important;
}

.fs-5 {
    font-size: 1.25rem !important;
}

.fs-6 {
    font-size: 1rem !important;
}

/* Flexbox Utilities */
.flex-grow-1 {
    flex-grow: 1 !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

.text-center {
    text-align: center !important;
}

/* Border and Shadow Utilities */
.rounded-circle {
    border-radius: 50% !important;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}

.bg-opacity-10 {
    background-color: rgba(var(--primary-color-rgb), 0.1) !important;
}

/* Table Utilities */
.table-light {
    background-color: #f8f9fa !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
}

/* Button Group Utilities */
.btn-group-vertical {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

/* Button Variants */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: white;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
    background-color: transparent;
}

.btn-outline-danger:hover {
    color: white;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-info {
    color: #0dcaf0;
    border-color: #0dcaf0;
    background-color: transparent;
}

.btn-outline-info:hover {
    color: white;
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

/* Badge Variants */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.bg-info {
    background-color: #0dcaf0 !important;
    color: white !important;
}

.bg-success {
    background-color: #198754 !important;
    color: white !important;
}

.bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.bg-light {
    background-color: #f8f9fa !important;
    color: #000 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Enhanced Typography */
.stats-card h3 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.stats-card:hover h3 {
    transform: scale(1.05);
}

/* Mobile Responsive Stats */
@media (max-width: 768px) {
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .stats-card .card-body {
        padding: 1rem !important;
    }
    
    .stats-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        padding: 0.5rem !important;
    }
    
    .stats-icon i {
        font-size: 1.25rem !important;
    }
}

/* Enhanced Category Management Styles */
.category-row, .user-row {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.category-row:hover, .user-row:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Enhanced Table Styling */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.table-hover tbody tr {
    transition: all 0.2s ease;
}

/* Enhanced Form Controls */
.form-select, .form-control {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.form-select:hover, .form-control:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.form-select:focus, .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

/* Enhanced Button Styling */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn::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;
}

.btn:hover::before {
    left: 100%;
}

/* Enhanced Badge Styling */
.badge {
    transition: all 0.2s ease;
    font-weight: 500;
}

.badge:hover {
    transform: scale(1.05);
}

/* Enhanced Card Styling */
.card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: rgba(79, 70, 229, 0.2);
}

/* Enhanced Search Box */
.admin-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-search-box input {
    padding-right: 2.5rem;
    transition: all 0.3s ease;
}

.admin-search-box input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.admin-search-icon {
    position: absolute;
    right: 0.75rem;
    color: #6b7280;
    pointer-events: none;
    z-index: 10;
    transition: color 0.3s ease;
}

.admin-search-box input:focus + .admin-search-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Enhanced Empty State */
.text-center.py-5 {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Enhanced Pagination */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    color: #6b7280;
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Enhanced Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ticket-specific styles */
.new-ticket {
    background-color: #f0f9ff !important;
    border-left: 4px solid #3b82f6;
}

.status-badge-blue {
    background-color: #3b82f6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.category-badge[data-category-color] {
    background-color: var(--category-color, #6b7280);
}

/* Ticket Category Color Avatar */
.category-color-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-color-avatar[data-color] {
    background-color: var(--data-color, #6b7280);
}

/* Hidden and Visible Field Classes */
.hidden-field {
    display: none !important;
}

.visible-field {
    display: block !important;
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .btn-group-vertical {
        flex-direction: row;
        gap: 0.25rem;
    }
    
    .btn-group-vertical .btn {
        flex: 1;
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .form-select, .form-control {
        font-size: 0.875rem;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Mobile-specific user page improvements */
    .admin-page-header {
        padding: 1rem;
    }
    
    .admin-page-title h1 {
        font-size: 1.5rem;
    }
    
    .admin-page-subtitle {
        font-size: 0.875rem;
    }
    
    .admin-section-header h2 {
        font-size: 1.25rem;
    }
    
    .stats-card .card-body {
        padding: 1rem !important;
    }
    
    .stats-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        padding: 0.5rem !important;
    }
    
    .stats-icon i {
        font-size: 1.25rem !important;
    }
    
    .user-row td {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }
    
    .admin-search-box input {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .admin-page-header {
        padding: 1.5rem;
    }
    
    .stats-card .card-body {
        padding: 1.25rem !important;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Large Desktop Optimizations */
@media (min-width: 1400px) {
    .admin-page-header {
        padding: 2rem 3rem;
    }
    
    .admin-section {
        margin-bottom: 3rem;
    }
    
    .stats-card .card-body {
        padding: 2rem !important;
    }
    
    .table th,
    .table td {
        padding: 1rem 0.75rem;
    }
}

/* Enhanced Focus States for Accessibility */
.form-select:focus,
.form-control:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Admin Section Styles */
.admin-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    overflow: hidden;
}

.admin-section-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-section-header small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.admin-section-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-section-content {
    padding: 2rem;
}

/* Responsive Admin Section */
@media (max-width: 768px) {
    .admin-section-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-section-header h2 {
        font-size: 1.25rem;
    }
    
    .admin-section-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .admin-section-content {
        padding: 1rem;
    }
}

/* License-specific styles */
.license-row {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.license-row:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* License key styling */
code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    background-color: #f8f9fa;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #e9ecef;
}

/* License status badges */
.badge.bg-success {
    background-color: #198754 !important;
    color: white !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: white !important;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.badge.bg-light {
    background-color: #f8f9fa !important;
    color: #000 !important;
}

/* License type indicators */
.license-type-single {
    color: #0dcaf0;
}

.license-type-multi {
    color: var(--primary-color);
}

.license-type-unlimited {
    color: #198754;
}

/* License expiry indicators */
.license-expired {
    color: #dc3545;
}

.license-expiring-soon {
    color: #ffc107;
}

.license-valid {
    color: #198754;
}

.license-never {
    color: #6c757d;
}

/* Enhanced License Table Responsive */
@media (max-width: 1200px) {
    .table th:nth-child(8),
    .table td:nth-child(8) {
        display: none;
    }
}

@media (max-width: 992px) {
    .table th:nth-child(7),
    .table td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 768px) {
    .table th:nth-child(6),
    .table td:nth-child(6),
    .table th:nth-child(5),
    .table td:nth-child(5) {
        display: none;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }
    
    .btn-group-vertical {
        flex-direction: row;
        gap: 0.25rem;
    }
    
    .btn-group-vertical .btn {
        flex: 1;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    code {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 576px) {
    .table th:nth-child(4),
    .table td:nth-child(4) {
        display: none;
    }
    
    .admin-section-header {
        padding: 0.75rem;
    }
    
    .admin-section-content {
        padding: 0.75rem;
    }
    
    .stats-card .card-body {
        padding: 0.75rem !important;
    }
    
    .stats-icon {
        width: 2rem !important;
        height: 2rem !important;
        padding: 0.375rem !important;
    }
    
    .stats-icon i {
        font-size: 1rem !important;
    }
}

/* License Key Responsive */
@media (max-width: 768px) {
    .table td:nth-child(2) {
        font-size: 0.7rem;
        word-break: break-all;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Customer Avatar Responsive */
@media (max-width: 768px) {
    .table td:nth-child(3) .d-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .table td:nth-child(3) .me-3 {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
    
    .table td:nth-child(3) .bg-gradient-primary {
        width: 32px !important;
        height: 32px !important;
    }
}

/* Empty State Styles */
.text-center.py-5 {
    padding: 3rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem;
    border: 2px dashed #dee2e6;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.text-center.py-5::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.text-center.py-5 > * {
    position: relative;
    z-index: 1;
}

.text-center.py-5 .mb-4 {
    margin-bottom: 1.5rem;
}

.text-center.py-5 i {
    color: #6c757d;
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

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

.text-center.py-5 h4 {
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #6c757d, #495057);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.text-center.py-5 p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 2rem;
}

.text-center.py-5 .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.text-center.py-5 .btn-primary {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    border: none;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
    position: relative;
    overflow: hidden;
}

.text-center.py-5 .btn-primary::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;
}

.text-center.py-5 .btn-primary:hover::before {
    left: 100%;
}

.text-center.py-5 .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
}

.text-center.py-5 .btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

/* Responsive Empty State */
@media (max-width: 768px) {
    .text-center.py-5 {
        padding: 2rem 1rem;
        margin: 1.5rem 0;
    }
    
    .text-center.py-5 i {
        font-size: 3rem;
    }
    
    .text-center.py-5 h4 {
        font-size: 1.25rem;
    }
    
    .text-center.py-5 p {
        font-size: 0.875rem;
        max-width: 300px;
    }
    
    .text-center.py-5 .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .text-center.py-5::before {
        animation: rotate 30s linear infinite;
    }
}

@media (max-width: 576px) {
    .text-center.py-5 {
        padding: 1.5rem 0.5rem;
        margin: 1rem 0;
        border-radius: 0.75rem;
    }
    
    .text-center.py-5 i {
        font-size: 2.5rem;
    }
    
    .text-center.py-5 h4 {
        font-size: 1.125rem;
    }
    
    .text-center.py-5 p {
        font-size: 0.8rem;
        max-width: 250px;
    }
    
    .text-center.py-5 .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .text-center.py-5::before {
        animation: rotate 40s linear infinite;
    }
}

/* Empty State Animation Override for Mobile */
@media (max-width: 768px) {
    .text-center.py-5 .fas.fa-key {
        animation: float 4s ease-in-out infinite;
    }
}

@media (max-width: 576px) {
    .text-center.py-5 .fas.fa-key {
        animation: float 5s ease-in-out infinite;
    }
}

/* Enhanced Animation for Category Cards */
.category-card {
    animation: fadeInUp 0.6s ease-out;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }

/* Admin Alert Styles */
.admin-alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideInDown 0.3s ease-out;
}

.admin-alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #166534;
}

.admin-alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.admin-alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.admin-alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

.admin-alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.admin-alert h4 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    font-size: 1rem;
}

.admin-alert p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.admin-alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* Dismissible Alert */
.admin-alert-dismissible {
    position: relative;
    padding-right: 3rem;
}

.admin-alert-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.admin-alert-close:hover {
    opacity: 1;
}

.admin-alert-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.admin-alert-icon {
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.admin-alert-text {
    flex: 1;
}

.admin-alert-text h4 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    font-size: 1rem;
}

.admin-alert-text p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-delay-200 {
    animation-delay: 0.2s;
}

.animate-delay-300 {
    animation-delay: 0.3s;
}

.animate-delay-400 {
    animation-delay: 0.4s;
}

.animate-delay-500 {
    animation-delay: 0.5s;
}

.animate-delay-600 {
    animation-delay: 0.6s;
}

.animate-fade-scale {
    animation: fadeScale 0.6s ease-out;
}

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

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (min-width: 1024px) {
    #admin-sidebar {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: var(--sidebar-width);
    }
    
    .admin-menu-toggle {
        display: none;
    }
}

@media (max-width: 1023px) {
    .admin-menu-toggle {
        display: flex;
    }
    
    #admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-topbar-right {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .admin-topbar-right {
        display: flex !important;
    }
}

@media (max-width: 1024px) {
    .dashboard-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-page {
        padding: var(--spacing-md);
    }
    
    .admin-main-content {
        padding: var(--spacing-md);
    }
    
    .admin-page-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dashboard-grid-4,
    .dashboard-grid-3,
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .admin-page {
        padding: var(--spacing-sm);
    }
    
    .admin-main-content {
        padding: var(--spacing-sm);
    }
    
    .admin-page-header-content {
        padding: 1.5rem;
    }
    
    .admin-card-content {
        padding: 1.5rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .stats-card-value {
        font-size: 1.5rem;
    }
}

/* RTL Support */
.admin-layout[dir="rtl"] #admin-sidebar {
    left: auto;
    right: 0;
    transform: translateX(100%);
}

.admin-layout[dir="rtl"] #admin-sidebar.open {
    transform: translateX(0);
}

.admin-layout[dir="rtl"] .admin-main {
    margin-left: 0;
    margin-right: 0;
}

@media (min-width: 1024px) {
    .admin-layout[dir="rtl"] .admin-main {
        margin-right: var(--sidebar-width);
    }
}

.admin-layout[dir="rtl"] .admin-sidebar-nav {
    direction: rtl;
}

.admin-layout[dir="rtl"] .admin-nav-item {
    text-align: right;
}

.admin-layout[dir="rtl"] .admin-nav-item-icon {
    order: 1;
}

.admin-layout[dir="rtl"] .admin-sidebar-logo {
    flex-direction: row-reverse;
}

.admin-layout[dir="rtl"] .admin-sidebar-logo-icon {
    order: 1;
}

.admin-layout[dir="rtl"] .admin-topbar-left {
    flex-direction: row-reverse;
}

.admin-layout[dir="rtl"] .admin-topbar-right {
    flex-direction: row-reverse;
}

/* Focus States */
.admin-btn:focus,
.admin-nav-item:focus,
.admin-user-btn:focus,
.admin-language-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    .admin-sidebar,
    .admin-topbar,
    .admin-page-actions {
        display: none !important;
    }
    
    .admin-main {
        margin-left: 0 !important;
    }
    
    .admin-page {
        padding: 0 !important;
    }
}

/* Font Awesome Icons Enhancement */
.admin-nav-item-icon svg,
.admin-sidebar-logo-icon svg,
.stats-card-icon svg,
.quick-action-icon svg,
.chart-icon svg,
.large-icon svg {
    display: none;
}

/* Font Awesome Icons */
.admin-nav-item-icon::before,
.admin-sidebar-logo-icon::before,
.stats-card-icon::before,
.quick-action-icon::before,
.chart-icon::before,
.large-icon::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dashboard Icon */
.admin-nav-item[href*="dashboard"] .admin-nav-item-icon::before {
    content: "\f3fd"; /* fa-tachometer-alt */
}

/* Products Icon */
.admin-nav-item[href*="products"] .admin-nav-item-icon::before {
    content: "\f1b2"; /* fa-cube */
}

/* Tickets Icon */
.admin-nav-item[href*="tickets"] .admin-nav-item-icon::before {
    content: "\f3ff"; /* fa-ticket-alt */
}

/* Licenses Icon */
.admin-nav-item[href*="licenses"] .admin-nav-item-icon::before {
    content: "\f084"; /* fa-key */
}

/* Knowledge Base Icon */
.admin-nav-item[href*="kb"] .admin-nav-item-icon::before {
    content: "\f02d"; /* fa-book */
}

/* Users Icon */
.admin-nav-item[href*="users"] .admin-nav-item-icon::before {
    content: "\f007"; /* fa-user */
}

/* Settings Icon */
.admin-nav-item[href*="settings"] .admin-nav-item-icon::before {
    content: "\f013"; /* fa-cog */
}

/* Reports Icon */
.admin-nav-item[href*="reports"] .admin-nav-item-icon::before {
    content: "\f080"; /* fa-chart-bar */
}

/* Email Templates Icon */
.admin-nav-item[href*="email"] .admin-nav-item-icon::before {
    content: "\f0e0"; /* fa-envelope */
}

/* Logout Icon */
.admin-logout-btn .admin-nav-item-icon::before {
    content: "\f2f5"; /* fa-sign-out-alt */
}

/* Logo Icon */
.admin-sidebar-logo-icon::before {
    content: "\f0e7"; /* fa-bolt */
}

/* Stats Icons */
.stats-card-icon.products::before {
    content: "\f1b2"; /* fa-cube */
}

.stats-card-icon.tickets::before {
    content: "\f3ff"; /* fa-ticket-alt */
}

.stats-card-icon.licenses::before {
    content: "\f084"; /* fa-key */
}

.stats-card-icon.articles::before {
    content: "\f02d"; /* fa-book */
}

.stats-card-icon.invoices::before {
    content: "\f571"; /* fa-file-invoice */
}

.stats-card-icon.amount::before {
    content: "\f155"; /* fa-dollar-sign */
}

.stats-card-icon.paid::before {
    content: "\f058"; /* fa-check-circle */
}

.stats-card-icon.cancelled::before {
    content: "\f057"; /* fa-times-circle */
}

/* Stats Menu Button */
.stats-menu-btn::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f142"; /* fa-ellipsis-v */
}

/* Stats Trend Icons */
.stats-trend-icon::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.stats-trend-icon.positive::before {
    content: "\f062"; /* fa-arrow-up */
}

.stats-trend-icon.negative::before {
    content: "\f063"; /* fa-arrow-down */
}

/* Chart Icons */
.chart-icon.bar::before {
    content: "\f080"; /* fa-chart-bar */
}

.chart-icon.pie::before {
    content: "\f200"; /* fa-chart-pie */
}

.chart-icon.line::before {
    content: "\f201"; /* fa-chart-line */
}

/* Export Button Icons */
.admin-btn[data-action="export-chart"]::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f019"; /* fa-download */
    margin-right: 0.25rem;
}

/* Arrow Icons */
.admin-btn .fa-arrow-right::before,
.quick-action-arrow .fa-arrow-right::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f061"; /* fa-arrow-right */
}

/* View All Button Icons */
.admin-btn[href*="tickets"]::before,
.admin-btn[href*="products"]::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f061"; /* fa-arrow-right */
    margin-right: 0.25rem;
}

/* Quick Action Arrow Icons */
.quick-action-arrow::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f061"; /* fa-arrow-right */
}

/* Bootstrap Overrides for Admin Theme */
.btn-group-vertical .btn {
    margin-bottom: 0.25rem;
}

.btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

/* Custom spacing for Bootstrap cards */
.card-header.bg-light {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6;
}

/* Custom table styling */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Custom badge spacing */
.badge {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Custom button group styling */
.btn-group-vertical {
    gap: 0.25rem;
}

/* Admin Layout Responsive Fixes */
.admin-layout {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .admin-layout {
        flex-direction: row;
    }
}

/* Desktop Layout */
@media (min-width: 1024px) {
    .admin-sidebar-overlay {
        display: none !important;
    }
}

/* Admin Main Content Responsive */
.admin-main-content {
    flex: 1;
    overflow-x: auto;
}

/* Sidebar Responsive */
@media (max-width: 1023px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        width: 280px;
        max-width: 80vw;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
}

/* Desktop Sidebar - Force visible */
@media (min-width: 1024px) {
    .admin-menu-toggle {
        display: none !important;
    }
}

/* Topbar Responsive */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.admin-topbar-content {
    padding: 1rem;
}

@media (max-width: 1023px) {
    .admin-topbar-right {
        display: none !important;
    }
}

/* Cards Responsive */
.admin-card {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .admin-card-header {
        padding: 1rem;
    }
    
    .admin-card-content {
        padding: 1rem;
    }
    
    .admin-page-header {
        padding: 1rem;
    }
    
    .admin-page-header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-page-actions {
        width: 100%;
    }
    
    .admin-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Table Responsive */
.admin-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .admin-table {
        font-size: 0.875rem;
    }
    
    .admin-table-header {
        padding: 0.5rem;
    }
    
    .admin-table-cell {
        padding: 0.5rem;
    }
    
    .admin-table-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .admin-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Form Responsive */
.dashboard-grid {
    display: grid;
    gap: 1rem;
}

.dashboard-grid-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .dashboard-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Badge Responsive */
.admin-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 768px) {
    .admin-badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
    }
}

/* Responsive Visibility Classes */
.hidden {
    display: none !important;
}

.sm\:hidden {
    display: none !important;
}

.sm\:inline {
    display: none !important;
}

@media (min-width: 640px) {
    .sm\:hidden {
        display: none !important;
    }
    
    .sm\:inline {
        display: inline !important;
    }
}

/* Mobile Menu Toggle */
.admin-menu-toggle {
    display: block;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #374151;
}

@media (min-width: 1024px) {
    .admin-menu-toggle {
        display: none;
    }
}

/* Sidebar Overlay */
#admin-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    display: none;
}

#admin-sidebar-overlay.show {
    display: block;
}

/* Mobile Sidebar */
@media (max-width: 1023px) {
    .admin-sidebar {
        width: 280px;
        max-width: 80vw;
    }
    
    body.sidebar-open {
        overflow: hidden;
    }
    
    body.sidebar-open .admin-main {
        transform: translateX(280px);
        transition: transform 0.3s ease-in-out;
    }
}

/* Sidebar Animation */

/* Topbar Mobile */
@media (max-width: 1023px) {
    .admin-topbar {
        position: sticky;
        top: 0;
        z-index: 50;
        background: white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .admin-topbar-content {
        padding: 0.75rem 1rem;
    }
    
    .admin-topbar-title {
        font-size: 1.125rem;
    }
}

/* Quick Action Icons */
.quick-action-icon.product::before {
    content: "\f067"; /* fa-plus */
}

/* ===== ADMIN SIDEBAR FIX - RESPONSIVE LAYOUT ===== */
/* Desktop Layout - Force Sidebar and Topbar Visibility */
@media (min-width: 1024px) {
    .admin-layout {
        display: flex !important;
        flex-direction: row !important;
        height: 100vh !important;
        overflow: hidden !important;
        position: relative !important;
    }
    
    /* Ensure body takes full height */
    body.admin-page {
        height: 100vh !important;
        overflow: hidden !important;
    }
    
    /* Ensure html takes full height */
    html {
        height: 100% !important;
    }
    
    /* Force topbar to always be visible */
    .admin-topbar {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        width: 100% !important;
        height: 64px !important;
        background: white !important;
        border-bottom: 1px solid #e2e8f0 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }
    
    .admin-topbar-content {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* LTR Layout (English) */
    .admin-layout[dir="ltr"] {
        flex-direction: row !important;
        height: 100vh !important;
        overflow: hidden !important;
    }
    
    .admin-layout[dir="ltr"] #admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        transform: translateX(0) !important;
        width: 280px !important;
        min-width: 280px !important;
        height: 100vh !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        z-index: 1 !important;
        order: 1 !important;
        background: var(--bg-dark) !important;
        border-right: 1px solid var(--border-dark) !important;
    }
    
    .admin-layout[dir="ltr"] .admin-main {
        flex: 1 !important;
        margin-left: 280px !important;
        width: calc(100% - 280px) !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        order: 2 !important;
        height: 100vh !important;
        overflow-y: auto !important;
        background: var(--bg-secondary) !important;
        position: relative !important;
        padding: 0 !important;
        margin-top: 0 !important;
    }
    
    .admin-layout[dir="ltr"] .admin-topbar {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 100 !important;
        background: white !important;
        border-bottom: 1px solid #e2e8f0 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
        height: 64px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .admin-layout[dir="ltr"] .admin-main-content {
        padding: 1rem !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .admin-layout[dir="ltr"] .admin-topbar-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* RTL Layout (Arabic) */
    .admin-layout[dir="rtl"] {
        flex-direction: row !important;
        height: 100vh !important;
        overflow: hidden !important;
    }
    
    .admin-layout[dir="rtl"] #admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        transform: translateX(0) !important;
        width: 280px !important;
        min-width: 280px !important;
        height: 100vh !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        z-index: 1 !important;
        order: 2 !important;
        background: var(--bg-dark) !important;
        border-left: 1px solid var(--border-dark) !important;
    }
    
    .admin-layout[dir="rtl"] .admin-main {
        flex: 1 !important;
        margin-right: 280px !important;
        width: calc(100% - 280px) !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        order: 1 !important;
        height: 100vh !important;
        overflow-y: auto !important;
        background: var(--bg-secondary) !important;
        position: relative !important;
        padding: 0 !important;
        margin-top: 0 !important;
    }
    
    .admin-layout[dir="rtl"] .admin-topbar {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 100 !important;
        background: white !important;
        border-bottom: 1px solid #e2e8f0 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
        height: 64px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .admin-layout[dir="rtl"] .admin-main-content {
        padding: 1rem !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .admin-layout[dir="rtl"] .admin-topbar-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 100% !important;
        box-sizing: border-box !important;
    }
    
    .admin-menu-toggle {
        display: none !important;
    }
    
    #admin-sidebar-overlay {
        display: none !important;
    }
}

/* Global Topbar Fix - Force visibility on all pages */
.admin-topbar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    width: 100% !important;
    height: 64px !important;
    background: white !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
}

.admin-topbar-content {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.admin-topbar-left {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    gap: 1rem !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.admin-topbar-right {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    gap: 1rem !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.admin-topbar-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Mobile Layout */
@media (max-width: 1023px) {
    .admin-layout {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* LTR Mobile Layout (English) */
    .admin-layout[dir="ltr"] #admin-sidebar {
        position: fixed !important;
        transform: translateX(-100%) !important;
        width: 280px !important;
        max-width: 80vw !important;
        height: 100vh !important;
        z-index: 50 !important;
        display: flex !important;
        flex-direction: column !important;
        left: 0 !important;
        right: auto !important;
    }
    
    .admin-layout[dir="ltr"] #admin-sidebar.open {
        transform: translateX(0) !important;
    }
    
    .admin-layout[dir="ltr"] .admin-main {
        flex: 1 !important;
        margin-left: 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* RTL Mobile Layout (Arabic) */
    .admin-layout[dir="rtl"] #admin-sidebar {
        position: fixed !important;
        transform: translateX(100%) !important;
        width: 280px !important;
        max-width: 80vw !important;
        height: 100vh !important;
        z-index: 50 !important;
        display: flex !important;
        flex-direction: column !important;
        right: 0 !important;
        left: auto !important;
    }
    
    .admin-layout[dir="rtl"] #admin-sidebar.open {
        transform: translateX(0) !important;
    }
    
    .admin-layout[dir="rtl"] .admin-main {
        flex: 1 !important;
        margin-right: 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .admin-menu-toggle {
        display: block !important;
    }
}

.quick-action-icon.tickets::before {
    content: "\f3ff"; /* fa-ticket-alt */
}

.quick-action-icon.users::before {
    content: "\f0c0"; /* fa-users */
}

.quick-action-icon.settings::before {
    content: "\f013"; /* fa-cog */
}

/* Chart Icons */
.chart-icon.bar::before {
    content: "\f080"; /* fa-chart-bar */
}

.chart-icon.pie::before {
    content: "\f200"; /* fa-chart-pie */
}

.chart-icon.line::before {
    content: "\f201"; /* fa-chart-line */
}

/* Large Icons */
.large-icon.ticket::before {
    content: "\f3ff"; /* fa-ticket-alt */
}

.large-icon.key::before {
    content: "\f084"; /* fa-key */
}

.large-icon.arrow::before {
    content: "\f062"; /* fa-arrow-up */
}

.large-icon.clock::before {
    content: "\f017"; /* fa-clock */
}

/* Language Dropdown Styles */
.admin-language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--spacing-sm);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 12rem;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
}

.admin-language-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-language-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

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

.admin-language-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.admin-language-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.admin-language-item.active::after {
    content: "\f00c"; /* fa-check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: auto;
    color: var(--primary-color);
}

.admin-language-flag {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    margin-right: var(--spacing-sm);
    font-size: 0.875rem;
}

/* User Profile Dropdown Styles */
.admin-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--spacing-sm);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 14rem;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
}

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

.admin-user-dropdown-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.admin-user-dropdown-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.admin-user-dropdown-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.admin-user-dropdown-details h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-user-dropdown-details p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-user-dropdown-menu {
    padding: var(--spacing-sm) 0;
}

.admin-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.admin-user-dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.admin-user-dropdown-item.danger {
    color: var(--danger-color);
}

.admin-user-dropdown-item.danger:hover {
    background: #fef2f2;
    color: var(--danger-color);
}

.admin-user-dropdown-item::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    width: 1rem;
    text-align: center;
}

.admin-user-dropdown-item.profile::before {
    content: "\f007"; /* fa-user */
}

.admin-user-dropdown-item.settings::before {
    content: "\f013"; /* fa-cog */
}

.admin-user-dropdown-item.language::before {
    content: "\f0ac"; /* fa-globe */
}

.admin-user-dropdown-item.logout::before {
    content: "\f2f5"; /* fa-sign-out-alt */
}

/* Topbar Elements */
.admin-topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: var(--spacing-md) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.admin-language-switcher {
    position: relative;
}

.admin-language-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.admin-language-btn:hover {
    background: var(--bg-tertiary);
}

.admin-language-btn::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f0ac"; /* fa-globe */
    margin-right: var(--spacing-xs);
}

.admin-user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.admin-user-profile:hover {
    background: var(--bg-tertiary);
}

.admin-user-profile-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.admin-user-profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.admin-user-profile-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.admin-user-profile-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.admin-user-profile-arrow {
    width: 1rem;
    height: 1rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.admin-user-profile-arrow::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f107"; /* fa-angle-down */
}

.admin-user-profile:hover .admin-user-profile-arrow {
    color: var(--text-primary);
}

/* Responsive Language and User Dropdowns */
@media (max-width: 1023px) {
    .admin-language-switcher,
    .admin-user-profile {
        display: none;
    }
}

@media (min-width: 1024px) {
    .admin-language-switcher,
    .admin-user-profile {
        display: flex;
    }
}

/* Latest Items Cards */
.latest-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.latest-item-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}

.latest-item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.latest-item-header {
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.latest-item-title-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.latest-item-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.latest-item-title-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-secondary);
}

.latest-item-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    margin-bottom: var(--spacing-md);
}

.latest-item-view-all {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.latest-item-view-all:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.latest-item-view-all::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f061"; /* fa-arrow-right */
}

.latest-item-content {
    padding: var(--spacing-xl);
}

.latest-item-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    color: var(--text-muted);
}

.latest-item-empty-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.3;
}

.latest-item-empty-text {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.latest-item-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.latest-item-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.latest-item-entry:hover {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

.latest-item-entry-info {
    flex: 1;
    min-width: 0;
}

.latest-item-entry-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
    word-break: break-all;
}

.latest-item-entry-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.latest-item-entry-details::before {
    content: "•";
    color: var(--text-muted);
}

.latest-item-entry-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.latest-item-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.latest-item-status-badge.active {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.latest-item-status-badge.suspended {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.latest-item-status-badge.expired {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.latest-item-status-badge.open {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.latest-item-status-badge.closed {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.latest-item-view-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.latest-item-view-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.latest-item-view-btn::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f061"; /* fa-arrow-right */
    font-size: 0.625rem;
}

/* Responsive Latest Items */
@media (max-width: 1023px) {
    .latest-items-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .latest-item-header {
        padding: var(--spacing-lg);
    }
    
    .latest-item-content {
        padding: var(--spacing-lg);
    }
    
    .latest-item-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .latest-item-view-all {
        align-self: flex-start;
    }
}

@media (max-width: 767px) {
    .latest-item-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .latest-item-entry-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .latest-item-view-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Programming Languages Table Responsive */
@media (max-width: 1200px) {
    .table th:nth-child(7),
    .table td:nth-child(7) {
        display: none; /* Hide Created column */
    }
}

@media (max-width: 992px) {
    .table th:nth-child(6),
    .table td:nth-child(6) {
        display: none; /* Hide Products column */
    }
}

@media (max-width: 768px) {
    .table th:nth-child(5),
    .table td:nth-child(5) {
        display: none; /* Hide Template column only */
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .d-flex.gap-1 {
        flex-direction: column;
        gap: 0.25rem !important;
    }
    
    .d-flex.gap-1 .btn {
        width: 100%;
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
    
    /* Ensure table content is visible */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 700px;
    }
    
    /* Programming Languages Mobile Enhancements */
    .language-row td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .language-row td:nth-child(2) {
        white-space: normal;
        max-width: 200px;
    }
    
    .language-row td:nth-child(2) .fw-semibold {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .language-row td:nth-child(2) small {
        display: block;
        font-size: 0.75rem;
    }
    
    /* Show more columns on tablet */
    .language-row td:nth-child(3),
    .language-row td:nth-child(4),
    .language-row td:nth-child(6),
    .language-row td:nth-child(8) {
        display: table-cell !important;
    }
    
    /* Force show important columns */
    .table th:nth-child(1),
    .table td:nth-child(1),
    .table th:nth-child(2),
    .table td:nth-child(2),
    .table th:nth-child(3),
    .table td:nth-child(3),
    .table th:nth-child(4),
    .table td:nth-child(4),
    .table th:nth-child(6),
    .table td:nth-child(6),
    .table th:nth-child(8),
    .table td:nth-child(8) {
        display: table-cell !important;
    }
}

@media (max-width: 576px) {
    .table th:nth-child(4),
    .table td:nth-child(4) {
        display: none; /* Hide Status column on very small screens */
    }
    
    .d-flex.gap-1 {
        flex-direction: column;
        gap: 0.2rem !important;
    }
    
    .d-flex.gap-1 .btn {
        width: 100%;
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
    
    /* Mobile specific adjustments */
    .table th,
    .table td {
        padding: 0.2rem 0.1rem;
        font-size: 0.75rem;
    }
    
    .table {
        min-width: 600px;
    }
    
    /* Make sure text doesn't wrap in cells */
    .table td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
    
    /* Special handling for language name column */
    .table td:nth-child(2) {
        max-width: 150px;
        white-space: normal;
    }
    
    /* Extension column adjustments */
    .table td:nth-child(3) {
        max-width: 80px;
        font-size: 0.7rem;
    }
    
    /* Programming Languages Mobile Enhancements */
    .language-row td {
        max-width: 120px;
    }
    
    .language-row td:nth-child(2) {
        max-width: 150px;
    }
    
    .language-row td:nth-child(3) {
        max-width: 80px;
        font-size: 0.7rem;
    }
    
    .language-row td:nth-child(4) {
        max-width: 100px;
    }
    
    .language-row td:nth-child(6) {
        max-width: 80px;
    }
    
    .language-row td:nth-child(8) {
        min-width: 180px;
    }
    
    .language-row td:nth-child(8) .d-flex {
        flex-wrap: wrap;
        gap: 0.2rem;
    }
    
    .language-row td:nth-child(8) .btn {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
}

@media (max-width: 480px) {
    .table th:nth-child(3),
    .table td:nth-child(3) {
        display: none; /* Hide Extension column on extra small screens */
    }
    
    .table {
        min-width: 500px;
    }
    
    .table th,
    .table td {
        padding: 0.15rem 0.05rem;
        font-size: 0.7rem;
    }
    
    .d-flex.gap-1 .btn {
        font-size: 0.6rem;
        padding: 0.1rem 0.25rem;
    }
    
    .badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.2rem;
    }
}

/* KB Categories and Articles Table Responsive */
@media (max-width: 1200px) {
    .kb-categories-table .table th:nth-child(6),
    .kb-categories-table .table td:nth-child(6),
    .kb-articles-table .table th:nth-child(6),
    .kb-articles-table .table td:nth-child(6) {
        display: none; /* Hide Created column */
    }
}

@media (max-width: 992px) {
    .kb-categories-table .table th:nth-child(5),
    .kb-categories-table .table td:nth-child(5),
    .kb-articles-table .table th:nth-child(5),
    .kb-articles-table .table td:nth-child(5) {
        display: none; /* Hide Protection/Status column */
    }
}

@media (max-width: 768px) {
    .kb-categories-table .table th:nth-child(3),
    .kb-categories-table .table td:nth-child(3),
    .kb-articles-table .table th:nth-child(3),
    .kb-articles-table .table td:nth-child(3) {
        display: none; /* Hide Parent/Category column */
    }
    
    .kb-categories-table .table th,
    .kb-categories-table .table td,
    .kb-articles-table .table th,
    .kb-articles-table .table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .kb-categories-table .table,
    .kb-articles-table .table {
        min-width: 600px;
    }
    
    /* KB Categories and Articles Mobile Enhancements */
    .kb-categories-table .category-row td,
    .kb-articles-table .article-row td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .kb-categories-table .category-row td:nth-child(2),
    .kb-articles-table .article-row td:nth-child(2) {
        white-space: normal;
        max-width: 200px;
    }
    
    .kb-categories-table .category-row td:nth-child(2) .fw-semibold,
    .kb-articles-table .article-row td:nth-child(2) .fw-semibold {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .kb-categories-table .category-row td:nth-child(2) small,
    .kb-articles-table .article-row td:nth-child(2) small {
        display: block;
        font-size: 0.75rem;
    }
    
    /* Show more columns on tablet */
    .kb-categories-table .category-row td:nth-child(1),
    .kb-categories-table .category-row td:nth-child(2),
    .kb-categories-table .category-row td:nth-child(4),
    .kb-categories-table .category-row td:nth-child(7),
    .kb-articles-table .article-row td:nth-child(1),
    .kb-articles-table .article-row td:nth-child(2),
    .kb-articles-table .article-row td:nth-child(4),
    .kb-articles-table .article-row td:nth-child(7) {
        display: table-cell !important;
    }
    
    /* Force show important columns */
    .kb-categories-table .table th:nth-child(1),
    .kb-categories-table .table td:nth-child(1),
    .kb-categories-table .table th:nth-child(2),
    .kb-categories-table .table td:nth-child(2),
    .kb-categories-table .table th:nth-child(4),
    .kb-categories-table .table td:nth-child(4),
    .kb-categories-table .table th:nth-child(7),
    .kb-categories-table .table td:nth-child(7),
    .kb-articles-table .table th:nth-child(1),
    .kb-articles-table .table td:nth-child(1),
    .kb-articles-table .table th:nth-child(2),
    .kb-articles-table .table td:nth-child(2),
    .kb-articles-table .table th:nth-child(4),
    .kb-articles-table .table td:nth-child(4),
    .kb-articles-table .table th:nth-child(7),
    .kb-articles-table .table td:nth-child(7) {
        display: table-cell !important;
    }
}

@media (max-width: 576px) {
    .kb-categories-table .table th:nth-child(4),
    .kb-categories-table .table td:nth-child(4),
    .kb-articles-table .table th:nth-child(4),
    .kb-articles-table .table td:nth-child(4) {
        display: none; /* Hide Articles/Views column */
    }
    
    .kb-categories-table .table th,
    .kb-categories-table .table td,
    .kb-articles-table .table th,
    .kb-articles-table .table td {
        padding: 0.2rem 0.1rem;
        font-size: 0.75rem;
    }
    
    .kb-categories-table .table,
    .kb-articles-table .table {
        min-width: 500px;
    }
    
    .kb-categories-table .category-row td,
    .kb-articles-table .article-row td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
    
    .kb-categories-table .category-row td:nth-child(2),
    .kb-articles-table .article-row td:nth-child(2) {
        max-width: 150px;
        white-space: normal;
    }
    
    .kb-categories-table .category-row td:nth-child(4),
    .kb-articles-table .article-row td:nth-child(4) {
        max-width: 80px;
        font-size: 0.7rem;
    }
    
    .kb-categories-table .category-row td:nth-child(7),
    .kb-articles-table .article-row td:nth-child(7) {
        min-width: 180px;
    }
    
    .kb-categories-table .category-row td:nth-child(7) .btn-group-vertical,
    .kb-articles-table .article-row td:nth-child(7) .btn-group-vertical {
        gap: 0.2rem;
    }
    
    .kb-categories-table .category-row td:nth-child(7) .btn,
    .kb-articles-table .article-row td:nth-child(7) .btn {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Tickets Table Responsive */
@media (max-width: 1200px) {
    .tickets-table .table th:nth-child(6),
    .tickets-table .table td:nth-child(6) {
        display: none; /* Hide Created column */
    }
}

@media (max-width: 992px) {
    .tickets-table .table th:nth-child(5),
    .tickets-table .table td:nth-child(5) {
        display: none; /* Hide Priority column */
    }
}

@media (max-width: 768px) {
    .tickets-table .table th:nth-child(4),
    .tickets-table .table td:nth-child(4) {
        display: none; /* Hide Category column */
    }
    
    .tickets-table .table th,
    .tickets-table .table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .tickets-table .table {
        min-width: 600px;
    }
    
    /* Tickets Mobile Enhancements */
    .tickets-table .ticket-row td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .tickets-table .ticket-row td:nth-child(2) {
        white-space: normal;
        max-width: 200px;
    }
    
    .tickets-table .ticket-row td:nth-child(2) .fw-semibold {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .tickets-table .ticket-row td:nth-child(2) small {
        display: block;
        font-size: 0.75rem;
    }
    
    /* Show more columns on tablet */
    .tickets-table .ticket-row td:nth-child(1),
    .tickets-table .ticket-row td:nth-child(2),
    .tickets-table .ticket-row td:nth-child(3),
    .tickets-table .ticket-row td:nth-child(7) {
        display: table-cell !important;
    }
    
    /* Force show important columns */
    .tickets-table .table th:nth-child(1),
    .tickets-table .table td:nth-child(1),
    .tickets-table .table th:nth-child(2),
    .tickets-table .table td:nth-child(2),
    .tickets-table .table th:nth-child(3),
    .tickets-table .table td:nth-child(3),
    .tickets-table .table th:nth-child(7),
    .tickets-table .table td:nth-child(7) {
        display: table-cell !important;
    }
}

@media (max-width: 576px) {
    .tickets-table .ticket-row td {
        max-width: 120px;
    }
    
    .tickets-table .ticket-row td:nth-child(2) {
        max-width: 150px;
    }
    
    .tickets-table .ticket-row td:nth-child(3) {
        max-width: 100px;
    }
    
    .tickets-table .ticket-row td:nth-child(7) {
        min-width: 180px;
    }
    
    .tickets-table .ticket-row td:nth-child(7) .admin-table-actions {
        flex-wrap: wrap;
        gap: 0.2rem;
    }
    
    .tickets-table .ticket-row td:nth-child(7) .btn {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Ticket Categories Table Responsive */
@media (max-width: 1200px) {
    .ticket-categories-table .table th:nth-child(7),
    .ticket-categories-table .table td:nth-child(7) {
        display: none; /* Hide Purchase Code column */
    }
}

@media (max-width: 992px) {
    .ticket-categories-table .table th:nth-child(6),
    .ticket-categories-table .table td:nth-child(6) {
        display: none; /* Hide Login column */
    }
}

@media (max-width: 768px) {
    .ticket-categories-table .table th:nth-child(3),
    .ticket-categories-table .table td:nth-child(3),
    .ticket-categories-table .table th:nth-child(4),
    .ticket-categories-table .table td:nth-child(4) {
        display: none; /* Hide Slug and Order columns */
    }
    
    .ticket-categories-table .table th,
    .ticket-categories-table .table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .ticket-categories-table .table {
        min-width: 600px;
    }
    
    /* Ticket Categories Mobile Enhancements */
    .ticket-categories-table .category-row td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .ticket-categories-table .category-row td:nth-child(2) {
        white-space: normal;
        max-width: 200px;
    }
    
    .ticket-categories-table .category-row td:nth-child(2) .fw-semibold {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .ticket-categories-table .category-row td:nth-child(2) small {
        display: block;
        font-size: 0.75rem;
    }
    
    /* Show more columns on tablet */
    .ticket-categories-table .category-row td:nth-child(1),
    .ticket-categories-table .category-row td:nth-child(2),
    .ticket-categories-table .category-row td:nth-child(5),
    .ticket-categories-table .category-row td:nth-child(8) {
        display: table-cell !important;
    }
    
    /* Force show important columns */
    .ticket-categories-table .table th:nth-child(1),
    .ticket-categories-table .table td:nth-child(1),
    .ticket-categories-table .table th:nth-child(2),
    .ticket-categories-table .table td:nth-child(2),
    .ticket-categories-table .table th:nth-child(5),
    .ticket-categories-table .table td:nth-child(5),
    .ticket-categories-table .table th:nth-child(8),
    .ticket-categories-table .table td:nth-child(8) {
        display: table-cell !important;
    }
}

@media (max-width: 576px) {
    .ticket-categories-table .category-row td {
        max-width: 120px;
    }
    
    .ticket-categories-table .category-row td:nth-child(2) {
        max-width: 150px;
    }
    
    .ticket-categories-table .category-row td:nth-child(5) {
        max-width: 100px;
    }
    
    .ticket-categories-table .category-row td:nth-child(8) {
        min-width: 180px;
    }
    
    .ticket-categories-table .category-row td:nth-child(8) .btn-group-vertical {
        gap: 0.2rem;
    }
    
    .ticket-categories-table .category-row td:nth-child(8) .btn {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Product Categories Table Responsive */
@media (max-width: 1200px) {
    .product-categories-table .table th:nth-child(6),
    .product-categories-table .table td:nth-child(6) {
        display: none; /* Hide Sort Order column */
    }
}

@media (max-width: 992px) {
    .product-categories-table .table th:nth-child(4),
    .product-categories-table .table td:nth-child(4) {
        display: none; /* Hide Products column */
    }
}

@media (max-width: 768px) {
    .product-categories-table .table th:nth-child(5),
    .product-categories-table .table td:nth-child(5) {
        display: none; /* Hide Status column */
    }
    
    .product-categories-table .table th,
    .product-categories-table .table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .product-categories-table .table {
        min-width: 600px;
    }
    
    /* Product Categories Mobile Enhancements */
    .product-categories-table tr td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-categories-table tr td:nth-child(2) {
        white-space: normal;
        max-width: 200px;
    }
    
    .product-categories-table tr td:nth-child(2) .fw-semibold {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .product-categories-table tr td:nth-child(2) small {
        display: block;
        font-size: 0.75rem;
    }
    
    /* Show more columns on tablet */
    .product-categories-table tr td:nth-child(1),
    .product-categories-table tr td:nth-child(2),
    .product-categories-table tr td:nth-child(3),
    .product-categories-table tr td:nth-child(7) {
        display: table-cell !important;
    }
    
    /* Force show important columns */
    .product-categories-table .table th:nth-child(1),
    .product-categories-table .table td:nth-child(1),
    .product-categories-table .table th:nth-child(2),
    .product-categories-table .table td:nth-child(2),
    .product-categories-table .table th:nth-child(3),
    .product-categories-table .table td:nth-child(3),
    .product-categories-table .table th:nth-child(7),
    .product-categories-table .table td:nth-child(7) {
        display: table-cell !important;
    }
}

@media (max-width: 576px) {
    .product-categories-table tr td {
        max-width: 120px;
    }
    
    .product-categories-table tr td:nth-child(2) {
        max-width: 150px;
    }
    
    .product-categories-table tr td:nth-child(3) {
        max-width: 100px;
    }
    
    .product-categories-table tr td:nth-child(7) {
        min-width: 180px;
    }
    
    .product-categories-table tr td:nth-child(7) .btn-group-vertical {
        gap: 0.2rem;
    }
    
    .product-categories-table tr td:nth-child(7) .btn {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Email Templates Table Responsive */
@media (max-width: 1200px) {
    .email-templates-table .table th:nth-child(5),
    .email-templates-table .table td:nth-child(5) {
        display: none; /* Hide Created column */
    }
}

@media (max-width: 992px) {
    .email-templates-table .table th:nth-child(4),
    .email-templates-table .table td:nth-child(4) {
        display: none; /* Hide Type column */
    }
}

@media (max-width: 768px) {
    .email-templates-table .table th,
    .email-templates-table .table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .email-templates-table .table {
        min-width: 600px;
    }
    
    /* Email Templates Mobile Enhancements */
    .email-templates-table tr td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .email-templates-table tr td:nth-child(2) {
        white-space: normal;
        max-width: 200px;
    }
    
    .email-templates-table tr td:nth-child(2) .fw-semibold {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .email-templates-table tr td:nth-child(2) small {
        display: block;
        font-size: 0.75rem;
    }
    
    /* Show more columns on tablet */
    .email-templates-table tr td:nth-child(1),
    .email-templates-table tr td:nth-child(2),
    .email-templates-table tr td:nth-child(3),
    .email-templates-table tr td:nth-child(6) {
        display: table-cell !important;
    }
    
    /* Force show important columns */
    .email-templates-table .table th:nth-child(1),
    .email-templates-table .table td:nth-child(1),
    .email-templates-table .table th:nth-child(2),
    .email-templates-table .table td:nth-child(2),
    .email-templates-table .table th:nth-child(3),
    .email-templates-table .table td:nth-child(3),
    .email-templates-table .table th:nth-child(6),
    .email-templates-table .table td:nth-child(6) {
        display: table-cell !important;
    }
    
    /* Fix button group layout */
    .email-templates-table .btn-group-vertical {
        flex-direction: column !important;
        gap: 0.25rem !important;
    }
    
    .email-templates-table .btn-group-vertical .btn {
        width: 100% !important;
        margin: 0 !important;
    }
}

@media (max-width: 576px) {
    .email-templates-table tr td {
        max-width: 120px;
    }
    
    .email-templates-table tr td:nth-child(2) {
        max-width: 150px;
    }
    
    .email-templates-table tr td:nth-child(3) {
        max-width: 100px;
    }
    
    .email-templates-table tr td:nth-child(6) {
        min-width: 180px;
    }
    
    .email-templates-table .btn-group-vertical {
        gap: 0.2rem !important;
    }
    
    .email-templates-table .btn-group-vertical .btn {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
        width: 100% !important;
    }
}

/* License Files Table Responsive */
@media (max-width: 1200px) {
    .license-files-table .table th:nth-child(6),
    .license-files-table .table td:nth-child(6) {
        display: none; /* Hide Size column */
    }
}

/* ========================================
   UNIFIED ADMIN FORMS STYLES
   ======================================== */

/* Form Container */
.container-fluid {
    background: #f8f9fa;
    min-height: 100vh;
}

/* Page Header */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 1.25rem 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.card-body {
    padding: 1.5rem;
}

/* Form Elements */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.form-label i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.form-label .text-danger {
    color: #dc3545;
    margin-left: 0.25rem;
}

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

/* Input Group */
.input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    color: #6c757d;
    font-weight: 500;
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: 2px solid #667eea;
}

/* Form Check */
.form-check-input {
    width: 3rem;
    height: 1.5rem;
    border-radius: 1rem;
    background-color: #e9ecef;
    border: none;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.form-check-label {
    font-weight: 500;
    color: #495057;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
}

.form-check-label i {
    margin-right: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
    transform: translateY(-2px);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #74c0fc 0%, #339af0 100%) !important;
}

/* Form Text */
.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.form-text i {
    margin-right: 0.25rem;
}

/* Products Page Specific Styles */
.products-form .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.products-form .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.products-form .form-control:focus,
.products-form .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.products-form .input-group-text {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #e9ecef;
    font-weight: 600;
}

.products-form .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.products-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.products-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.products-form .btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    font-weight: 600;
}

.products-form .btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    transform: translateY(-2px);
}

.products-form .badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

.products-form .alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.products-form .form-text {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

.products-form .form-text i {
    color: #667eea;
}

/* File Upload Styles */
.products-form .file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.products-form .file-upload-area:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.products-form .file-upload-area.dragover {
    border-color: #28a745;
    background: #f0fff4;
}

/* Additional color utilities for edit page */
.bg-pink {
    background-color: #e91e63 !important;
}

.text-pink {
    color: #e91e63 !important;
}

.bg-purple {
    background-color: #9c27b0 !important;
}

.text-purple {
    color: #9c27b0 !important;
}

.btn-purple {
    background-color: #9c27b0;
    border-color: #9c27b0;
    color: white;
}

.btn-purple:hover {
    background-color: #8e24aa;
    border-color: #8e24aa;
    color: white;
}

.bg-indigo {
    background-color: #3f51b5 !important;
}

.text-indigo {
    color: #3f51b5 !important;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Summernote Editor - Using default styles from CDN */

/* Loading States */
.products-form .loading {
    position: relative;
    color: transparent;
}

.products-form .loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ticket-specific styles */
.new-ticket {
    background-color: #f0f9ff !important;
    border-left: 4px solid #3b82f6;
}

.status-badge-blue {
    background-color: #3b82f6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.category-badge[data-category-color] {
    background-color: var(--category-color, #6b7280);
}

/* Ticket Category Color Avatar */
.category-color-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-color-avatar[data-color] {
    background-color: var(--data-color, #6b7280);
}

/* Hidden and Visible Field Classes */
.hidden-field {
    display: none !important;
}

.visible-field {
    display: block !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-form .card-body {
        padding: 1rem;
    }
    
    .products-form .form-control,
    .products-form .form-select {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .products-form .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .products-form .card-title {
        font-size: 1rem;
    }
    
    .products-form .file-upload-area {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    .d-grid .btn {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .license-files-table .table th:nth-child(3),
    .license-files-table .table td:nth-child(3) {
        display: none; /* Hide Extension column */
    }
}

@media (max-width: 768px) {
    .license-files-table .table th:nth-child(5),
    .license-files-table .table td:nth-child(5) {
        display: none; /* Hide Status column */
    }
    
    .license-files-table .table th,
    .license-files-table .table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .license-files-table .table {
        min-width: 600px;
    }
    
    /* License Files Mobile Enhancements */
    .license-files-table .license-file-row td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .license-files-table .license-file-row td:nth-child(2) {
        white-space: normal;
        max-width: 200px;
    }
    
    .license-files-table .license-file-row td:nth-child(2) .fw-semibold {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .license-files-table .license-file-row td:nth-child(2) small {
        display: block;
        font-size: 0.75rem;
    }
    
    /* Show more columns on tablet */
    .license-files-table .license-file-row td:nth-child(1),
    .license-files-table .license-file-row td:nth-child(2),
    .license-files-table .license-file-row td:nth-child(4),
    .license-files-table .license-file-row td:nth-child(7) {
        display: table-cell !important;
    }
    
    /* Force show important columns */
    .license-files-table .table th:nth-child(1),
    .license-files-table .table td:nth-child(1),
    .license-files-table .table th:nth-child(2),
    .license-files-table .table td:nth-child(2),
    .license-files-table .table th:nth-child(4),
    .license-files-table .table td:nth-child(4),
    .license-files-table .table th:nth-child(7),
    .license-files-table .table td:nth-child(7) {
        display: table-cell !important;
    }
    
    /* Fix button group layout */
    .license-files-table .btn-group-vertical {
        flex-direction: column !important;
        gap: 0.25rem !important;
    }
    
    .license-files-table .btn-group-vertical .btn {
        width: 100% !important;
        margin: 0 !important;
    }
}

@media (max-width: 576px) {
    .license-files-table .license-file-row td {
        max-width: 120px;
    }
    
    .license-files-table .license-file-row td:nth-child(2) {
        max-width: 150px;
    }
    
    .license-files-table .license-file-row td:nth-child(4) {
        max-width: 100px;
    }
    
    .license-files-table .license-file-row td:nth-child(7) {
        min-width: 180px;
    }
    
    .license-files-table .btn-group-vertical {
        gap: 0.2rem !important;
    }
    
    .license-files-table .btn-group-vertical .btn {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
        width: 100% !important;
    }
}

/* Enhanced Table Responsive for All Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mobile Table Enhancements */
@media (max-width: 768px) {
    .table-responsive {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
    }
    
    .table {
        margin-bottom: 0;
    }
    
    .table th,
    .table td {
        border-top: 1px solid #dee2e6;
        vertical-align: middle;
    }
    
    .table thead th {
        border-bottom: 2px solid #dee2e6;
        background-color: #f8f9fa;
        font-weight: 600;
        font-size: 0.875rem;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .table {
        min-width: 450px;
    }
    
    .table th,
    .table td {
        padding: 0.2rem 0.1rem;
        font-size: 0.75rem;
    }
    
    .btn-sm {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
    
    /* Ensure all content is accessible */
    .table td {
        max-width: 120px;
    }
    
    .table td:nth-child(2) {
        max-width: 180px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== EMAIL TEMPLATE STYLES ===== */

/* Email Template Variables */
.variable-item {
    cursor: pointer;
    transition: var(--transition);
}

.variable-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.variable-item .border {
    border-color: var(--border-color) !important;
    transition: var(--transition);
}

.variable-item:hover .border {
    border-color: var(--primary-color) !important;
}

/* Email Template Preview */
.preview-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.preview-header {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 1rem;
}

.preview-subject {
    font-weight: 600;
}

.preview-content-wrapper {
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.preview-content {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-top: none;
}

/* Email Preview in Show Page */
.email-preview {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Email Template Test Page */
.email-template-test .card-header {
    border-bottom: 1px solid var(--border-color);
}

.email-template-test .form-label {
    font-weight: 600;
    color: var(--text-primary);
}

.email-template-test .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* Email Template Show Page */
.email-template-show .card-header {
    border-bottom: 1px solid var(--border-color);
}

.email-template-show .form-label {
    font-weight: 600;
    color: var(--text-primary);
}

.email-template-show .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Email Template Create/Edit Pages */
.products-form .variable-item {
    margin-bottom: 1rem;
}

.products-form .variable-item .d-flex {
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.products-form .variable-item:hover .d-flex {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
}

.products-form .variable-item code {
    font-size: 0.875rem;
    font-weight: 600;
    background: none;
    padding: 0;
}

.products-form .variable-item .text-muted {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Notification Styles */
.admin-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.admin-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-notification-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.admin-notification-message {
    flex: 1;
}

    /* Email Template Index Styles */
    .template-avatar {
        width: 48px;
        height: 48px;
    }

    .empty-state-icon {
        font-size: 4rem;
    }

    .preview-body-container {
        max-height: 300px;
        overflow-y: auto;
    }

    /* Invoice Styles */
    .invoice-avatar {
        width: 48px;
        height: 48px;
    }

    /* KB Article Styles */
    .article-avatar {
        width: 48px;
        height: 48px;
    }

    .article-image {
        max-width: 200px;
    }

    /* KB Category Styles */
    .category-avatar {
        width: 48px;
        height: 48px;
    }

    /* Hidden/Visible Field Styles */
    .hidden-field {
        display: none !important;
    }

    .visible-field {
        display: block !important;
    }

    /* Invoice Show Styles */
    .invoice-show .timeline {
        position: relative;
        padding-left: 30px;
    }

    .invoice-show .timeline-item {
        position: relative;
        margin-bottom: 20px;
    }

    .invoice-show .timeline-marker {
        position: absolute;
        left: -35px;
        top: 5px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }

    .invoice-show .timeline-content {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        border-left: 3px solid #007bff;
    }

    .invoice-show .timeline-title {
        margin-bottom: 5px;
        font-weight: 600;
    }

    .invoice-show .timeline-text {
        margin-bottom: 0;
        font-size: 0.9em;
    }

    .invoice-show .stats-card {
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }

    .invoice-show .invoice-status-display {
        background: #f8f9fa;
        padding: 20px;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }

    .invoice-show .invoice-amount-display {
        background: #e3f2fd;
        padding: 15px;
        border-radius: 8px;
        border: 1px solid #bbdefb;
    }

    /* License Styles */
    .license-avatar {
        width: 48px;
        height: 48px;
    }

    /* Product Styles */
    .product-avatar {
        width: 48px;
        height: 48px;
    }

    .product-image {
        max-width: 200px;
    }

    .product-gallery-image {
        width: 60px;
        height: 60px;
        object-fit: cover;
    }

    /* Category Styles */
    .category-avatar {
        width: 48px;
        height: 48px;
    }

    .category-image {
        max-width: 200px;
    }

    .category-color-avatar {
        width: 48px;
        height: 48px;
    }

    .category-preview {
        color: white;
    }

    .category-badge {
        color: white !important;
    }

    /* User Styles */
    .user-avatar {
        width: 48px;
        height: 48px;
    }

    .user-avatar-small {
        width: 40px;
        height: 40px;
    }

    .user-avatar-large {
        width: 60px;
        height: 60px;
    }

    /* License Show Styles */
    .license-show .timeline {
        position: relative;
        padding-left: 30px;
    }

    .license-show .timeline-item {
        position: relative;
        margin-bottom: 20px;
    }

    .license-show .timeline-marker {
        position: absolute;
        left: -35px;
        top: 5px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }

    .license-show .timeline-content {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        border-left: 3px solid #007bff;
    }

    .license-show .timeline-title {
        margin-bottom: 5px;
        font-weight: 600;
    }

    .license-show .timeline-text {
        margin-bottom: 0;
        font-size: 0.9em;
    }

    .license-show .stats-card {
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }

    .license-show .license-key-display {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }

    .license-show .license-key-display code {
        word-break: break-all;
        font-size: 0.9em;
    }

    /* Programming Languages Styles */
    .language-avatar {
        width: 48px;
        height: 48px;
    }

    .license-file-content {
        background-color: #f8f9fa;
    }

    .license-file-pre {
        margin: 0;
        white-space: pre-wrap;
        font-family: 'Courier New', monospace;
        font-size: 0.9rem;
    }

    /* Admin Info Styles */
    .admin-info-item {
        margin-bottom: 1rem;
    }

    .admin-info-label {
        display: block;
        font-weight: 600;
        color: #6b7280;
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
    }

    .admin-info-value {
        color: #1f2937;
        font-size: 1rem;
    }

    .admin-stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .admin-stat-item {
        text-align: center;
        padding: 1rem;
        background: #f8f9fa;
        border-radius: 8px;
    }

    .admin-stat-value {
        font-size: 1.25rem;
        font-weight: 600;
        color: #1f2937;
    }

    .admin-stat-label {
        font-size: 0.875rem;
        color: #6b7280;
        margin-top: 0.25rem;
    }

    /* Profile Edit Page Styles */
    .admin-profile-edit .admin-stats-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .admin-profile-edit .admin-stat-item {
        display: flex;
        align-items: center;
        padding: 1rem;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }

    .admin-profile-edit .admin-stat-icon {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: white;
        border-radius: 50%;
        margin-right: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .admin-profile-edit .admin-stat-content {
        flex: 1;
    }

    .admin-profile-edit .admin-stat-value {
        font-size: 1.25rem;
        font-weight: 600;
        color: #1f2937;
        line-height: 1;
    }

    .admin-profile-edit .admin-stat-label {
        font-size: 0.875rem;
        color: #6b7280;
        margin-top: 0.25rem;
    }

    /* Profile Form Styles */
    .admin-profile-edit .admin-form-group {
        margin-bottom: 1.5rem;
    }

    .admin-profile-edit .admin-form-label {
        display: block;
        font-weight: 600;
        color: #374151;
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
    }

    .admin-profile-edit .admin-form-label.required::after {
        content: " *";
        color: #ef4444;
    }

    .admin-profile-edit .admin-form-input {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        font-size: 0.875rem;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .admin-profile-edit .admin-form-input:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .admin-profile-edit .admin-form-error {
        color: #ef4444;
        font-size: 0.75rem;
        margin-top: 0.25rem;
    }

    .admin-profile-edit .admin-form-actions {
        display: flex;
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 1rem;
        border-top: 1px solid #e9ecef;
    }

    /* Profile Card Styles */
    .admin-profile-edit .admin-card {
        margin-bottom: 2rem;
    }

    .admin-profile-edit .admin-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem;
        border-bottom: 1px solid #e9ecef;
        background: #f8f9fa;
    }

    .admin-profile-edit .admin-card-title {
        display: flex;
        align-items: center;
        font-size: 1.125rem;
        font-weight: 600;
        color: #1f2937;
        margin: 0;
    }

    .admin-profile-edit .admin-card-content {
        padding: 1.5rem;
    }

    /* Profile Badge Styles */
    .admin-profile-edit .admin-badge {
        padding: 0.25rem 0.75rem;
        border-radius: 9999px;
        font-size: 0.75rem;
        font-weight: 500;
    }

    .admin-profile-edit .admin-badge-primary {
        background-color: #dbeafe;
        color: #1e40af;
    }

    .admin-profile-edit .admin-badge-info {
        background-color: #dbeafe;
        color: #1e40af;
    }

    .admin-profile-edit .admin-badge-warning {
        background-color: #fef3c7;
        color: #92400e;
    }

    .admin-profile-edit .profile-icon-large {
        font-size: 3rem;
    }

    /* Responsive Design for Profile */
    @media (max-width: 768px) {
        .admin-profile-edit .admin-stats-grid {
            grid-template-columns: 1fr;
        }

        .admin-profile-edit .admin-form-actions {
            flex-direction: column;
        }

    .admin-profile-edit .admin-form-actions .admin-btn {
        width: 100%;
    }
}

/* Envato Guide Page Styles */
.admin-envato-guide .admin-code-block {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    border: 1px solid #374151;
}

.admin-envato-guide .admin-code-line {
    margin-bottom: 0.25rem;
}

.admin-envato-guide .admin-code-line:last-child {
    margin-bottom: 0;
}

/* Settings Page Styles */
.admin-settings-page .admin-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.admin-settings-page .admin-tab-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-settings-page .admin-tab-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.admin-settings-page .admin-tab-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.admin-settings-page .admin-tab-panel {
    display: none;
}

.admin-settings-page .admin-tab-panel:not(.admin-tab-panel-hidden) {
    display: block !important;
}

.admin-settings-page .admin-tab-panel.active {
    display: block;
}

.admin-settings-page .admin-form-help {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.admin-settings-page .admin-form-color {
    width: 50px;
    height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
}

.admin-settings-page .admin-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 120px;
}

.admin-settings-page .admin-form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-settings-page .admin-file-upload {
    position: relative;
    display: inline-block;
}

.admin-settings-page .admin-file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.admin-settings-page .admin-file-label {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-settings-page .admin-file-label:hover {
    background: #f3f4f6;
}

.admin-settings-page .admin-image-preview {
    max-width: 200px;
    height: auto;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.admin-settings-page .admin-logo-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.admin-settings-page .admin-logo-preview-image {
    width: var(--logo-width, 150px);
    height: var(--logo-height, 50px);
    object-fit: contain;
}

.admin-settings-page .admin-logo-preview-text {
    color: var(--logo-text-color, #1f2937);
    font-size: var(--logo-text-font-size, 24px);
    font-weight: 600;
}

/* Switch Styles */
.admin-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.admin-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.admin-switch-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.admin-switch-label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.admin-switch-input:checked + .admin-switch-label {
    background-color: #3b82f6;
}

.admin-switch-input:checked + .admin-switch-label:before {
    transform: translateX(26px);
}

/* Responsive Design for Settings */
@media (max-width: 768px) {
    .admin-settings-page .admin-tabs-nav {
        flex-direction: column;
    }

    .admin-settings-page .admin-tab-btn {
        width: 100%;
        justify-content: center;
    }

    .admin-settings-page .admin-logo-preview {
        flex-direction: column;
        text-align: center;
    }
}

/* Preloader Modal Styles */
.admin-preloader-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.admin-preloader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-preloader-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.admin-preloader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ticket-specific styles */
.new-ticket {
    background-color: #f0f9ff !important;
    border-left: 4px solid #3b82f6;
}

.status-badge-blue {
    background-color: #3b82f6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.category-badge[data-category-color] {
    background-color: var(--category-color, #6b7280);
}

/* Ticket Category Color Avatar */
.category-color-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-color-avatar[data-color] {
    background-color: var(--data-color, #6b7280);
}

/* Hidden and Visible Field Classes */
.hidden-field {
    display: none !important;
}

.visible-field {
    display: block !important;
}

/* Enhanced Tickets Empty State */
.admin-tickets-page .tickets-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.admin-tickets-page .admin-empty-state-content {
    margin-bottom: 3rem;
}

.admin-tickets-page .admin-empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.admin-tickets-page .admin-empty-state-icon i {
    font-size: 3rem;
    color: white;
}

.admin-tickets-page .admin-empty-state-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-tickets-page .admin-empty-state-description {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.admin-tickets-page .admin-empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.admin-tickets-page .admin-empty-state-stats {
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.admin-tickets-page .admin-stat-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.admin-tickets-page .admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.admin-tickets-page .admin-stat-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-tickets-page .admin-stat-icon i {
    font-size: 1.5rem;
}

.admin-tickets-page .admin-stat-content {
    flex: 1;
}

.admin-tickets-page .admin-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.admin-tickets-page .admin-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.admin-tickets-page .admin-empty-state-tips {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.admin-tickets-page .admin-tips-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-tickets-page .admin-tip-card {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
}

.admin-tickets-page .admin-tip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.admin-tickets-page .admin-tip-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-tickets-page .admin-tip-icon i {
    font-size: 1.25rem;
}

.admin-tickets-page .admin-tip-content h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.admin-tickets-page .admin-tip-content p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Responsive Design for Tickets Empty State */
@media (max-width: 768px) {
    .admin-tickets-page .tickets-empty-state {
        padding: 2rem 1rem;
    }
    
    .admin-tickets-page .admin-empty-state-icon {
        width: 80px;
        height: 80px;
    }
    
    .admin-tickets-page .admin-empty-state-icon i {
        font-size: 2rem;
    }
    
    .admin-tickets-page .admin-empty-state-title {
        font-size: 1.5rem;
    }
    
    .admin-tickets-page .admin-empty-state-description {
        font-size: 1rem;
    }
    
    .admin-tickets-page .admin-empty-state-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .admin-tickets-page .admin-empty-state-actions .admin-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .admin-tickets-page .admin-stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-tickets-page .admin-stat-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .admin-tickets-page .admin-tip-card {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-tickets-page .admin-tip-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

    /* Responsive Design for Email Templates */
    @media (max-width: 768px) {
        .email-template-show .col-lg-4,
        .email-template-test .col-lg-4 {
            margin-top: 1rem;
        }
        
        .variable-item .d-flex {
            flex-direction: column;
            text-align: center;
            gap: 0.5rem;
        }
        
        .preview-container {
            margin-bottom: 1rem;
        }
        
        .preview-content-wrapper {
            max-height: 200px;
        }
    }

    @media (max-width: 576px) {
        .email-template-show .d-flex.justify-content-between {
            flex-direction: column;
            gap: 1rem;
        }
        
        .email-template-show .d-flex.justify-content-between > div {
            width: 100%;
        }
        
        .email-template-show .btn-group {
            width: 100%;
        }
        
        .email-template-show .btn-group .btn {
            flex: 1;
        }
    }

/* Programming Languages Edit Page Styles */
.admin-programming-languages-edit {
    padding: 0;
}

.admin-programming-languages-edit .admin-page-header {
    margin-bottom: 2rem;
}

.admin-programming-languages-edit .admin-section {
    margin-bottom: 2rem;
}

.admin-programming-languages-edit .admin-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
}

.admin-programming-languages-edit .admin-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.admin-programming-languages-edit .admin-card-content {
    padding: 1.5rem;
}

.admin-programming-languages-edit .admin-card-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
}

.admin-programming-languages-edit .admin-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.admin-programming-languages-edit .admin-card-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    font-weight: 500;
}

.admin-programming-languages-edit .admin-card-text {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0.5rem 0 0 0;
    line-height: 1.6;
}

/* Tab Navigation */
.admin-programming-languages-edit .admin-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
    background: #f9fafb;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 0.5rem;
    gap: 0.25rem;
}

.admin-programming-languages-edit .admin-tab-btn {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.75rem;
    background: transparent;
    border: none;
    color: #6b7280;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    font-size: 0.875rem;
}

.admin-programming-languages-edit .admin-tab-btn:hover {
    background: #f3f4f6;
    color: #374151;
    transform: translateY(-1px);
}

.admin-programming-languages-edit .admin-tab-btn.admin-tab-btn-active {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.admin-programming-languages-edit .admin-tab-btn.admin-tab-btn-active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #8b5cf6;
}

.admin-programming-languages-edit .admin-tab-panel {
    display: block;
}

.admin-programming-languages-edit .admin-tab-panel-hidden {
    display: none;
}

/* Programming Languages Show Tabs */
.admin-programming-languages-show .admin-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
    background: #f9fafb;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 0.5rem;
    gap: 0.25rem;
}

.admin-programming-languages-show .admin-tab-btn {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.75rem;
    background: transparent;
    border: none;
    color: #6b7280;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    font-size: 0.875rem;
}

.admin-programming-languages-show .admin-tab-btn:hover {
    background: #f3f4f6;
    color: #374151;
    transform: translateY(-1px);
}

.admin-programming-languages-show .admin-tab-btn.admin-tab-btn-active {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.admin-programming-languages-show .admin-tab-btn.admin-tab-btn-active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #8b5cf6;
}

.admin-programming-languages-show .admin-tab-panel {
    display: block;
}

.admin-programming-languages-show .admin-tab-panel-hidden {
    display: none !important;
}

/* Force show active tab panel */
.admin-programming-languages-show .admin-tab-panel:not(.admin-tab-panel-hidden) {
    display: block !important;
}

/* Programming Languages Index Tabs */
.admin-programming-languages-index .admin-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
    background: #f9fafb;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 0.5rem;
    gap: 0.25rem;
}

.admin-programming-languages-index .admin-tab-btn {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.75rem;
    background: transparent;
    border: none;
    color: #6b7280;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    font-size: 0.875rem;
}

.admin-programming-languages-index .admin-tab-btn:hover {
    background: #f3f4f6;
    color: #374151;
    transform: translateY(-1px);
}

.admin-programming-languages-index .admin-tab-btn.admin-tab-btn-active {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.admin-programming-languages-index .admin-tab-btn.admin-tab-btn-active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #8b5cf6;
}

.admin-programming-languages-index .admin-tab-panel {
    display: block;
}

.admin-programming-languages-index .admin-tab-panel-hidden {
    display: none !important;
}

/* Force show active tab panel */
.admin-programming-languages-index .admin-tab-panel:not(.admin-tab-panel-hidden) {
    display: block !important;
}

/* Reports Page Styles */
.admin-reports-page {
    padding: 0;
}

/* Export Cards */
.admin-reports-page .export-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.admin-reports-page .export-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.admin-reports-page .export-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-reports-page .export-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.admin-reports-page .export-icon {
    font-size: 1.5rem;
    color: white;
}

.admin-reports-page .export-content {
    flex: 1;
}

.admin-reports-page .export-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.admin-reports-page .export-description {
    color: #6b7280;
    margin: 0;
    font-size: 0.875rem;
}

.admin-reports-page .export-card-footer {
    margin-top: auto;
}

/* Stats Cards */
.admin-reports-page .stats-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-reports-page .stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
}

.admin-reports-page .stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.admin-reports-page .stats-card-primary::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.admin-reports-page .stats-card-success::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.admin-reports-page .stats-card-warning::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.admin-reports-page .stats-card-danger::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.admin-reports-page .stats-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-reports-page .stats-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.admin-reports-page .stats-icon {
    font-size: 1.25rem;
    color: #6b7280;
}

.admin-reports-page .stats-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
}

.admin-reports-page .stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.admin-reports-page .stats-label {
    color: #6b7280;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Revenue Cards */
.admin-reports-page .revenue-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-reports-page .revenue-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.admin-reports-page .revenue-card-success::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.admin-reports-page .revenue-card-warning::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.admin-reports-page .revenue-card-danger::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.admin-reports-page .revenue-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.admin-reports-page .revenue-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-reports-page .revenue-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.admin-reports-page .revenue-icon {
    font-size: 1.25rem;
    color: #6b7280;
}

.admin-reports-page .revenue-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.admin-reports-page .revenue-card-success .revenue-trend {
    color: #10b981;
}

.admin-reports-page .revenue-card-warning .revenue-trend {
    color: #f59e0b;
}

.admin-reports-page .revenue-card-danger .revenue-trend {
    color: #ef4444;
}

.admin-reports-page .revenue-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.admin-reports-page .revenue-label {
    color: #6b7280;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Chart Cards */
.admin-reports-page .chart-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.admin-reports-page .chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.admin-reports-page .chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
}

/* Table Cards */
.admin-reports-page .table-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.admin-reports-page .table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Chart Fallback */
.admin-reports-page .chart-fallback {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
}

.admin-reports-page .chart-fallback-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.admin-reports-page .chart-fallback-title {
    color: #495057;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.admin-reports-page .chart-fallback-data {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
}

.admin-reports-page .chart-fallback-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: 0.25rem;
    border: 1px solid #e9ecef;
}

.admin-reports-page .chart-fallback-label {
    font-weight: 500;
    color: #495057;
}

.admin-reports-page .chart-fallback-value {
    font-weight: 600;
    color: #007bff;
}

.admin-reports-page .chart-fallback-message {
    color: #6c757d;
    margin: 0;
}

/* Avatars */
.admin-reports-page .user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1976d2;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-reports-page .ip-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d32f2f;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Empty States */
.admin-reports-page .admin-empty-state {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.admin-reports-page .admin-empty-state::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.admin-reports-page .admin-empty-state-content {
    max-width: 450px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.admin-reports-page .empty-state-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    position: relative;
}

.admin-reports-page .empty-state-icon-wrapper::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.1;
}

.admin-reports-page .admin-empty-state-icon {
    font-size: 2.5rem;
    color: #3b82f6;
    margin: 0;
    opacity: 1;
}

.admin-reports-page .admin-empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-reports-page .admin-empty-state-description {
    color: #64748b;
    margin: 0 0 2rem 0;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.admin-reports-page .admin-empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-reports-page .admin-empty-state-actions .admin-btn {
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.admin-reports-page .admin-empty-state-actions .admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Chart Fallback Improvements */
.admin-reports-page .chart-fallback {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
}

.admin-reports-page .chart-fallback-content {
    max-width: 300px;
    margin: 0 auto;
}

.admin-reports-page .chart-fallback-title {
    color: #475569;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.admin-reports-page .chart-fallback-data {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.admin-reports-page .chart-fallback-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-reports-page .chart-fallback-label {
    font-weight: 500;
    color: #475569;
    font-size: 0.875rem;
}

.admin-reports-page .chart-fallback-value {
    font-weight: 600;
    color: #3b82f6;
    font-size: 0.875rem;
}

.admin-reports-page .chart-fallback-message {
    color: #64748b;
    margin: 0;
    font-size: 0.875rem;
}

/* Responsive Design for Reports */
@media (max-width: 768px) {
    .admin-reports-page .chart-container {
        height: 250px;
    }
    
    .admin-reports-page .chart-fallback {
        padding: 1rem;
    }
    
    .admin-reports-page .chart-fallback-data {
        max-width: 100%;
    }
    
    .admin-reports-page .export-card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-reports-page .export-icon-wrapper {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .admin-reports-page .stats-value,
    .admin-reports-page .revenue-value {
        font-size: 1.5rem;
    }
}

/* Form Styles */
.admin-programming-languages-edit .admin-form-group {
    margin-bottom: 1.5rem;
}

.admin-programming-languages-edit .admin-form-label {
    display: block;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.admin-programming-languages-edit .admin-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease-in-out;
    background: #fff;
    font-weight: 500;
}

.admin-programming-languages-edit .admin-form-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    transform: translateY(-1px);
}

.admin-programming-languages-edit .admin-form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease-in-out;
    background: #fff;
    resize: vertical;
    min-height: 120px;
    font-weight: 500;
}

.admin-programming-languages-edit .admin-form-textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    transform: translateY(-1px);
}

.admin-programming-languages-edit .admin-form-help {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.admin-programming-languages-edit .admin-form-error {
    display: block;
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* Input Group for Icon Preview */
.admin-programming-languages-edit .input-group-text {
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-left: none;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
}

.admin-programming-languages-edit .input-group .admin-form-input {
    border-right: none;
}

.admin-programming-languages-edit .input-group .admin-form-input:focus + .input-group-text {
    border-color: #8b5cf6;
}

/* Stats Grid */
.admin-programming-languages-edit .admin-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.admin-programming-languages-edit .admin-stat-item {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease-in-out;
}

.admin-programming-languages-edit .admin-stat-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.admin-programming-languages-edit .admin-stat-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    margin-right: 1rem;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
}

.admin-programming-languages-edit .admin-stat-content {
    flex: 1;
}

.admin-programming-languages-edit .admin-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.admin-programming-languages-edit .admin-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
    font-weight: 600;
}

/* Info List */
.admin-programming-languages-edit .admin-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-programming-languages-edit .admin-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease-in-out;
}

.admin-programming-languages-edit .admin-info-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.admin-programming-languages-edit .admin-info-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.admin-programming-languages-edit .admin-info-value {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 700;
}

/* Upload Zone */
.admin-programming-languages-edit .admin-upload-zone {
    border: 3px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    text-align: center;
    background: #f9fafb;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.admin-programming-languages-edit .admin-upload-zone:hover {
    border-color: #8b5cf6;
    background: #faf5ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.1);
}

.admin-programming-languages-edit .admin-upload-zone.dragover {
    border-color: #8b5cf6;
    background: #faf5ff;
    transform: scale(1.02);
    box-shadow: 0 8px 12px -2px rgba(139, 92, 246, 0.2);
}

.admin-programming-languages-edit .admin-upload-icon {
    font-size: 3.5rem;
    color: #8b5cf6;
    margin-bottom: 1rem;
}

.admin-programming-languages-edit .admin-upload-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.admin-programming-languages-edit .admin-upload-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.admin-programming-languages-edit .admin-upload-formats {
    font-size: 0.75rem;
    color: #8b5cf6;
    margin-top: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* File Info */
.admin-programming-languages-edit .admin-file-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

.admin-programming-languages-edit .admin-file-info-hidden {
    display: none;
}

.admin-programming-languages-edit .admin-file-info-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-programming-languages-edit .admin-file-info-details {
    display: flex;
    align-items: center;
}

.admin-programming-languages-edit .admin-file-info-icon {
    font-size: 1.5rem;
    color: #6b7280;
    margin-right: 0.75rem;
}

.admin-programming-languages-edit .admin-file-info-name {
    font-weight: 600;
    color: #374151;
}

/* Empty State */
.admin-programming-languages-edit .admin-empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.admin-programming-languages-edit .admin-empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.admin-programming-languages-edit .admin-empty-state-icon {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.admin-programming-languages-edit .admin-empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.admin-programming-languages-edit .admin-empty-state-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0;
}

/* Code Editor Styles */
.admin-programming-languages-edit .admin-code-editor-container {
    position: relative;
}

.admin-programming-languages-edit .admin-code-editor {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    background: #1f2937;
    color: #f9fafb;
    border: 2px solid #374151;
    border-radius: 0.5rem;
}

.admin-programming-languages-edit .admin-code-editor:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.admin-programming-languages-edit .admin-code-editor-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.admin-programming-languages-edit .admin-code-action-btn {
    background: #374151;
    border: 1px solid #4b5563;
    color: #f9fafb;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.admin-programming-languages-edit .admin-code-action-btn:hover {
    background: #4b5563;
    border-color: #6b7280;
}

/* Template Preview Styles */
.admin-programming-languages-edit .admin-code-block {
    background: #1f2937;
    color: #10b981;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    max-height: 16rem;
    overflow-y: auto;
    white-space: pre-wrap;
}

.admin-programming-languages-edit .admin-code-pre {
    font-size: 0.75rem;
    overflow-x: auto;
    max-height: 12rem;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-programming-languages-edit .admin-tabs-nav {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .admin-programming-languages-edit .admin-tab-btn {
        justify-content: center;
        padding: 0.5rem 1rem;
    }
    
    .admin-programming-languages-edit .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-programming-languages-edit .admin-upload-zone {
        padding: 2rem 1rem;
    }
    
    .admin-programming-languages-edit .admin-file-info-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
/* File Management Responsive */
.admin-programming-languages-edit .admin-code-block {
    overflow-x: auto;
    max-width: 100%;
    position: relative;
}

.admin-programming-languages-edit .admin-code-block h4 {
    font-size: 0.875rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem;
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.admin-programming-languages-edit .admin-code-pre {
    font-size: 0.75rem;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
    max-height: 20rem;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.admin-programming-languages-edit .admin-info-list {
    overflow-x: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-programming-languages-edit .admin-info-item {
    min-width: 200px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Remove overlay issues */
.admin-programming-languages-edit .admin-code-block::before,
.admin-programming-languages-edit .admin-code-block::after {
    display: none !important;
}

/* Code editor improvements */
.admin-programming-languages-edit .admin-code-editor-container {
    position: relative;
    overflow: hidden;
}

.admin-programming-languages-edit .admin-code-editor {
    resize: vertical;
    min-height: 200px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.admin-programming-languages-edit .admin-code-editor-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 20;
}

.admin-programming-languages-edit .admin-code-action-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-programming-languages-edit .admin-code-action-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
}



@media (max-width: 576px) {
    .admin-programming-languages-edit .admin-card-content {
        padding: 1rem;
    }
    
    .admin-programming-languages-edit .admin-stat-item {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-programming-languages-edit .admin-stat-icon {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }
    
    .admin-programming-languages-edit .admin-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    /* Extra small screens - File Management */
    .admin-programming-languages-edit .admin-code-block {
        padding: 0.75rem;
        margin: 0 -0.5rem;
    }
    
    .admin-programming-languages-edit .admin-code-block h4 {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .admin-programming-languages-edit .admin-code-pre {
        font-size: 0.5rem;
        line-height: 1.2;
        max-height: 8rem;
    }
    
    .admin-programming-languages-edit .admin-info-list {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    
    .admin-programming-languages-edit .admin-info-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .admin-programming-languages-edit .admin-info-label {
        font-size: 0.75rem;
    }
    
    .admin-programming-languages-edit .admin-info-value {
        font-size: 0.75rem;
    }
}

/* Settings Page Tabs */
.admin-settings-page .admin-tabs-nav {
    display: flex;
    margin-bottom: 2rem;
    background: transparent;
    border-bottom: 2px solid #e9ecef;
    padding: 0;
    gap: 0;
    flex-wrap: wrap;
    border: none;
}

.admin-settings-page .admin-tab-btn {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: #6c757d;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    font-size: 0.9rem;
    white-space: nowrap;
    min-height: 3rem;
    border-bottom: 3px solid transparent;
}

.admin-settings-page .admin-tab-btn:hover {
    background: transparent;
    color: #8b5cf6;
    border-color: transparent;
}

.admin-settings-page .admin-tab-btn.admin-tab-btn-active {
    background: transparent;
    color: #8b5cf6;
    border-color: transparent;
    box-shadow: none;
    font-weight: 600;
    border-bottom: 3px solid #8b5cf6;
}

.admin-settings-page .admin-tab-btn.admin-tab-btn-active::before {
    display: none;
}


/* Settings Page Responsive */
@media (max-width: 768px) {
    .admin-settings-page .admin-tabs-nav {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .admin-settings-page .admin-tab-btn {
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .admin-settings-page .admin-tab-btn {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .admin-settings-page .admin-tab-btn i {
        font-size: 0.75rem;
    }
}

/* Fix text visibility in code editor */
.admin-code-editor,
textarea[name="license_template"],
#license_template {
    color: #1a1a1a !important;
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    font-family: Monaco, Consolas, "Courier New", monospace !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.admin-code-editor:focus,
textarea[name="license_template"]:focus,
#license_template:focus {
    color: #1a1a1a !important;
    background-color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Ensure text is visible in all states */
.admin-code-editor.readonly-template,
textarea[name="license_template"].readonly-template,
#license_template.readonly-template {
    color: #374151 !important;
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

/* Read-only Template Styles */
.readonly-indicator {
    position: relative;
    margin-top: 10px;
}

.readonly-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    animation: pulse 2s infinite;
}

.readonly-badge i {
    font-size: 12px;
}

.readonly-template {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}

.readonly-template:focus {
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
}

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

/* ===== NOTIFICATION SYSTEM ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    z-index: 10000;
    max-width: 400px;
    word-wrap: break-word;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background-color: var(--success-color);
    border-left: 4px solid #059669;
}

.notification-error {
    background-color: var(--danger-color);
    border-left: 4px solid #dc2626;
}

.notification-warning {
    background-color: var(--warning-color);
    border-left: 4px solid #d97706;
}

.notification-info {
    background-color: var(--info-color);
    border-left: 4px solid #2563eb;
}

.notification-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* RTL Support for notifications */
[dir="rtl"] .notification {
    right: auto;
    left: 20px;
    transform: translateX(-100%);
}

[dir="rtl"] .notification.show {
    transform: translateX(0);
}

/* ===== REPORTS PAGE ENHANCEMENTS ===== */
/* Enhanced styling for Reports page statistics and charts */

/* Statistics Cards */
.stats-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stats-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid var(--border-color);
}

.stats-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stats-icon {
    color: white;
}

.stats-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.stats-card-body {
    padding: 1.5rem;
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.stats-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Revenue Cards */
.revenue-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.revenue-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.revenue-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid var(--border-color);
}

.revenue-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.revenue-icon {
    color: white;
}

.revenue-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.revenue-card-body {
    padding: 1.5rem;
}

.revenue-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.revenue-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Chart Cards */
.chart-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.chart-card .admin-card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.chart-card .admin-card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-card .admin-card-title i {
    color: var(--primary-color);
    font-size: 1rem;
}

.chart-container {
    position: relative;
    height: 300px;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--radius-md);
    margin: 1rem;
}

.chart-container canvas {
    max-height: 100% !important;
    border-radius: var(--radius-md);
}

/* Color Variants */
.stats-card-warning .stats-icon-wrapper {
    background: var(--warning-color);
}

.stats-card-danger .stats-icon-wrapper {
    background: var(--danger-color);
}

.revenue-card-success .revenue-icon-wrapper {
    background: var(--success-color);
}

.revenue-card-warning .revenue-icon-wrapper {
    background: var(--warning-color);
}

.revenue-card-danger .revenue-icon-wrapper {
    background: var(--danger-color);
}

/* Enhanced Chart Styling */
.chart-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--radius-md);
    margin: 1rem;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.chart-container canvas {
    border-radius: var(--radius-md);
    position: relative;
    z-index: 2;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Chart Loading State */
.chart-container.loading {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.chart-container.loading::after {
    content: 'Loading chart...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 1rem;
    z-index: 3;
}

/* Chart Error State */
.chart-container.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
}

.chart-container.error::after {
    content: 'Error loading chart';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--danger-color);
    font-size: 1rem;
    z-index: 3;
}

/* Loading States */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-muted);
    font-size: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--radius-md);
    margin: 1rem;
}

.chart-loading i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error States */
.chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--danger-color);
    font-size: 1rem;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: var(--radius-md);
    margin: 1rem;
    border: 1px solid #fecaca;
}

.chart-error i {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-card-header,
    .revenue-card-header {
        padding: 1rem;
    }
    
    .stats-card-body,
    .revenue-card-body {
        padding: 1rem;
    }
    
    .stats-value,
    .revenue-value {
        font-size: 1.5rem;
    }
    
    .chart-container {
        height: 250px;
        margin: 0.5rem;
    }
    
    .chart-loading,
    .chart-error {
        height: 250px;
    }
}

[dir="rtl"] .notification-success,
[dir="rtl"] .notification-error,
[dir="rtl"] .notification-warning,
[dir="rtl"] .notification-info {
    border-left: none;
    border-right: 4px solid;
}

[dir="rtl"] .notification-success {
    border-right-color: #059669;
}

[dir="rtl"] .notification-error {
    border-right-color: #dc2626;
}

[dir="rtl"] .notification-warning {
    border-right-color: #d97706;
}

[dir="rtl"] .notification-info {
    border-right-color: #2563eb;
}

/* ===== ENHANCED PAGINATION STYLES ===== */
/* Beautiful and modern pagination for admin and user interfaces */

/* Admin Pagination */
.admin-pagination-wrapper {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.admin-pagination-info {
    justify-self: start;
}

.admin-pagination-stats {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.admin-pagination-text {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.admin-pagination-center {
    justify-self: center;
}

.admin-pagination-numbers {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.admin-pagination-nav {
    justify-self: end;
}

.admin-pagination-controls {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.admin-page-item {
    display: flex;
}

.admin-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #64748b;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 2.75rem;
    height: 2.75rem;
}

.admin-page-link:hover {
    background: rgba(255, 255, 255, 1);
    color: #1e293b;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-page-item.active .admin-page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.admin-page-item.disabled .admin-page-link {
    background: rgba(248, 250, 252, 0.5);
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

.admin-page-prev,
.admin-page-next {
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    min-width: auto;
}

.admin-page-number {
    min-width: 2.75rem;
    justify-content: center;
}

.admin-page-dots {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: default;
}

.admin-page-dots:hover {
    transform: none;
    box-shadow: none;
}

.admin-single-page {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-radius: 0.75rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* User Pagination */
.user-pagination-wrapper {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 1rem;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.user-pagination-info {
    justify-self: start;
}

.user-pagination-stats {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-pagination-text {
    font-size: 0.875rem;
    color: #475569;
    font-weight: 500;
}

.user-pagination-center {
    justify-self: center;
}

.user-pagination-numbers {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.user-pagination-nav {
    justify-self: end;
}

.user-pagination-controls {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.user-page-item {
    display: flex;
}

.user-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    color: #475569;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 2.75rem;
    height: 2.75rem;
}

.user-page-link:hover {
    background: #fff;
    color: #1e293b;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-page-item.active .user-page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.user-page-item.disabled .user-page-link {
    background: rgba(248, 250, 252, 0.5);
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

.user-page-prev,
.user-page-next {
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    min-width: auto;
}

.user-page-number {
    min-width: 2.75rem;
    justify-content: center;
}

.user-page-dots {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: default;
}

.user-page-dots:hover {
    transform: none;
    box-shadow: none;
}

.user-single-page {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-radius: 0.75rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Responsive Design for Pagination */
@media (max-width: 768px) {
    .admin-pagination-wrapper,
    .user-pagination-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        padding: 1rem;
    }
    
    .admin-pagination-info,
    .user-pagination-info {
        justify-self: center;
        order: 1;
    }
    
    .admin-pagination-center,
    .user-pagination-center {
        order: 2;
    }
    
    .admin-pagination-nav,
    .user-pagination-nav {
        justify-self: center;
        order: 3;
    }
    
    .admin-pagination-numbers,
    .user-pagination-numbers {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .admin-pagination-controls,
    .user-pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .admin-page-link,
    .user-page-link {
        padding: 0.5rem 0.75rem;
        min-width: 2.25rem;
        height: 2.25rem;
        font-size: 0.8rem;
    }
    
    .admin-page-prev,
    .admin-page-next,
    .user-page-prev,
    .user-page-next {
        padding: 0.5rem 1rem;
    }
}

/* ===== EMAIL TEMPLATE PREVIEW ===== */
.email-template-preview {
    min-height: 300px;
    background-color: #f8f9fa;
}

/* ===== INSTALLATION SETTINGS ===== */
.email-settings.d-none {
    display: none !important;
}

.email-settings.d-block {
    display: block !important;
}

/* ===== IMAGE PREVIEW STYLES ===== */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== CODE PREVIEW STYLES ===== */
.code-preview {
    max-height: 400px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.code-preview code {
    background: none;
    padding: 0;
    color: #495057;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Responsive code preview */
@media (max-width: 768px) {
    .code-preview {
        max-height: 300px;
        font-size: 0.8rem;
        padding: 0.75rem;
    }
    
    .image-preview {
        max-width: 150px;
        max-height: 150px;
    }
}

/* End of file */
}

