/* ============================================
   Modern Dashboard UI - CSS Stylesheet
   Features: Neumorphism, Glassmorphism, Dark Mode
   ============================================ */

/* CSS Variables for Theme Support */
:root {
    /* Light Mode Colors */
    --bg-primary: #f0fdf4; /* Emerald-50 */
    --bg-secondary: #ffffff;
    --bg-tertiary: #ecfdf5;
    --text-primary: #125439; /* Emerald-900 (custom) */
    --text-secondary: #047857; /* Emerald-700 */
    --text-tertiary: #6ee7b7;
    --border-color: #d1fae5;
    --shadow-sm: 0 2px 4px rgba(18, 84, 57, 0.05);
    --shadow-md: 0 4px 6px rgba(18, 84, 57, 0.1);
    --shadow-lg: 0 10px 15px rgba(18, 84, 57, 0.1);
    --shadow-xl: 0 20px 25px rgba(18, 84, 57, 0.15);

    /* Neumorphism Shadows (Updated to match Green theme) */
    --neu-shadow-light: 8px 8px 16px rgba(18, 84, 57, 0.1), -8px -8px 16px rgba(255, 255, 255, 0.8);
    --neu-shadow-inset: inset 4px 4px 8px rgba(18, 84, 57, 0.05), inset -4px -4px 8px rgba(255, 255, 255, 0.9);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.4);

    /* Accent Colors */
    --accent-primary: #125439;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Mode Variables */
.dark-mode {
    --bg-primary: #022c22;
    --bg-secondary: #064e3b;
    --bg-tertiary: #065f46;
    --text-primary: #ecfdf5;
    --text-secondary: #a7f3d0;
    --text-tertiary: #34d399;
    --border-color: #065f46;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);

    --neu-shadow-light: 8px 8px 16px rgba(0, 0, 0, 0.5), -8px -8px 16px rgba(6, 78, 59, 0.5);
    --neu-shadow-inset: inset 4px 4px 8px rgba(0, 0, 0, 0.4), inset -4px -4px 8px rgba(6, 78, 59, 0.4);

    --glass-bg: rgba(6, 78, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--neu-shadow-light);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--neu-shadow-inset);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Mobile Menu Toggle (for off-canvas sidebar) */
.mobile-menu-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--neu-shadow-light);
    color: var(--text-primary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition-base);
}

.mobile-menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--neu-shadow-inset);
}

.mobile-menu-toggle:active {
    transform: translateY(0);
}

/* Sidebar Backdrop (click outside to close) */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* Prevent scroll when sidebar is open on mobile */
body.sidebar-open {
    overflow: hidden;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    padding-top: 20px;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    top: 0;
    right: 0;
    transition: transform var(--transition-base), width var(--transition-base);
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    white-space: nowrap;
}

.logo i {
    font-size: 2rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

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

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

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

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-blue);
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(-5px);
}

.nav-item.active .nav-link {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--accent-blue);
    box-shadow: var(--shadow-sm);
}

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

.nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.sidebar.collapsed .user-info {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    transition: margin-right var(--transition-base);
    padding: 2rem;
}

.sidebar.collapsed~.main-content {
    margin-right: var(--sidebar-collapsed-width);
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    right: 1rem;
    color: var(--text-tertiary);
}

.search-box input {
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    width: 300px;
    transition: all var(--transition-base);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.notification-btn {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

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

.notification-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--accent-red);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-menu-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.user-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.user-avatar-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

/* Content Area */
.content-area {
    max-width: 1400px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

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

/* Stat Card */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-content {
    flex: 1;
}

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

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

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.stat-trend.positive {
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
}

.stat-trend.negative {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

.stat-trend.neutral {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

/* Card Styles */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

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

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-secondary);
    transform: rotate(90deg);
}

.text-btn {
    background: none;
    border: none;
    color: var(--accent-blue);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.text-btn:hover {
    color: var(--accent-purple);
}

.card-body {
    padding: 1.5rem;
}

/* Chart Card */
.chart-card {
    grid-column: span 2;
}

#chartCanvas {
    width: 100%;
    height: 300px;
}

/* Activity List */
.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all var(--transition-base);
    cursor: pointer;
}

.activity-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(-5px);
}

.activity-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.activity-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.activity-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.activity-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.activity-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Neumorphic Button */
.action-btn.neumorphic {
    padding: 1.25rem;
    border: none;
    border-radius: 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-base);
    box-shadow: var(--neu-shadow-light);
    position: relative;
    overflow: hidden;
}

.action-btn.neumorphic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.action-btn.neumorphic:hover::before {
    opacity: 1;
}

.action-btn.neumorphic:hover {
    transform: translateY(-3px);
    box-shadow: var(--neu-shadow-inset);
}

.action-btn.neumorphic:active {
    transform: translateY(0);
    box-shadow: var(--neu-shadow-inset);
}

.action-btn.neumorphic i {
    font-size: 1.5rem;
    color: var(--accent-blue);
    position: relative;
    z-index: 1;
}

.action-btn.neumorphic span {
    position: relative;
    z-index: 1;
}

/* Progress Card */
.progress-item {
    margin-bottom: 1.5rem;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-title {
    color: var(--text-primary);
    font-weight: 500;
}

.progress-percent {
    color: var(--accent-blue);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--neu-shadow-inset);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 10px;
    transition: width var(--transition-slow);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Notification Panel */
.notification-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.notification-panel.active {
    transform: translateX(0);
}

.notification-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-btn:hover {
    background: var(--bg-secondary);
    transform: rotate(90deg);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    background: var(--bg-secondary);
    transition: all var(--transition-base);
    cursor: pointer;
}

.notification-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.notification-content span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .chart-card,
    .products-card,
    .files-card {
        grid-column: span 1;
    }

    .sidebar {
        width: min(var(--sidebar-width), 85vw);
        max-width: 320px;
        transform: translateX(100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-content {
        margin-right: 0;
    }

    .topbar {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .search-box input {
        width: 100%;
    }

    .product-item,
    .file-item {
        flex-wrap: wrap;
    }

    .file-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}

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

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .product-item,
    .file-item {
        padding: 0.75rem;
    }

    .product-icon,
    .file-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .product-name,
    .file-name {
        font-size: 0.875rem;
    }

    .product-meta,
    .file-meta {
        font-size: 0.75rem;
    }

    .product-badge {
        width: 100%;
        margin-top: 0.5rem;
    }

    .badge-text {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Products List */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.product-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-blue);
}

.product-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.product-badge {
    flex-shrink: 0;
}

.badge-text {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Files List */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.file-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-green);
}

.file-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.file-action-btn {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.file-action-btn:hover {
    background: var(--accent-blue);
    color: white;
    transform: scale(1.1);
}

.file-action-btn i {
    font-size: 0.875rem;
}

/* Products Card */
.products-card {
    grid-column: span 1;
}

/* Files Card */
.files-card {
    grid-column: span 1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.card {
    animation: fadeIn 0.5s ease-out;
}

/* Accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 10px;
}

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

/* ============================================
   Additional Styles for New Pages
   ============================================ */

/* Page Header Actions */
.page-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 150px;
    transition: all var(--transition-base);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
}

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

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

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

.icon-btn-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.icon-btn-sm:hover {
    background: var(--accent-blue);
    color: white;
    transform: scale(1.1);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.category-card {
    transition: all var(--transition-base);
}

.category-card:hover {
    transform: translateY(-5px);
}

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

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.category-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.category-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.category-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.category-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.category-icon.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.category-icon.teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.category-actions {
    display: flex;
    gap: 0.5rem;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.category-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.category-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.view-files-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.view-files-link:hover {
    color: var(--accent-purple);
    transform: translateX(-5px);
}

/* Data Table */
.files-table-container,
.orders-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

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

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

.data-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

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

.file-row-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon-small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.badge-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    font-size: 0.875rem;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.pagination-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.product-card {
    overflow: hidden;
    transition: all var(--transition-base);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card-image {
    position: relative;
    min-height: 150px;
    max-height: 400px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image img.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-height: 100%;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.product-image-placeholder.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.product-image-placeholder.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.product-image-placeholder.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.product-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-status-badge.active {
    background: var(--accent-green);
    color: white;
}

.product-status-badge.inactive {
    background: var(--text-tertiary);
    color: white;
}

.product-card-body {
    padding: 1.5rem;
}

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

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

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

.product-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.product-card-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.product-card-footer {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
}

/* Banners Grid */
.banners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.banner-card {
    overflow: hidden;
}

.banner-preview {
    position: relative;
    height: 200px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
}

.banner-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 2rem;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.banner-preview:hover .banner-overlay {
    opacity: 1;
}

.banner-info {
    padding: 1.5rem;
}

.banner-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.banner-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.banner-position {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.banner-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.banner-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.banner-status.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.banner-dates {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Orders Stats Bar */
.orders-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.order-stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.order-stat-card.pending {
    border-left: 4px solid var(--accent-orange);
}

.order-stat-card.processing {
    border-left: 4px solid var(--accent-blue);
}

.order-stat-card.completed {
    border-left: 4px solid var(--accent-green);
}

.order-stat-card.cancelled {
    border-left: 4px solid var(--accent-red);
}

.order-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.order-stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Order Status & Payment Methods */
.order-status {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.order-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
}

.order-status.processing {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.order-status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.order-status.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.payment-method {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.payment-method.visa {
    background: rgba(26, 26, 46, 0.1);
    color: #1a1a2e;
}

.payment-method.mastercard {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

.payment-method.mada {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.payment-method.apple-pay {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.settings-tab {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all var(--transition-base);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.settings-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.settings-tab.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    box-shadow: var(--shadow-md);
}

.settings-content {
    display: none;
}

.settings-content.active {
    display: block;
}

.settings-section {
    padding: 2rem;
}

.settings-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.settings-section-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Payment Method Cards */
.payment-method-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.payment-method-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-method-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-blue);
}

.payment-method-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.payment-method-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.payment-method-settings {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    transition: var(--transition-base);
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-base);
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--accent-blue);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

/* Checkbox */
.checkbox-select-all {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {

    .categories-grid,
    .products-grid,
    .banners-grid {
        grid-template-columns: 1fr;
    }

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

    .settings-tabs {
        flex-direction: column;
    }

    .page-header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
    }

    /* Mobile-friendly tables (stacked cards) */
    .files-table-container,
    .orders-table-container,
    .table-container {
        overflow-x: visible;
    }

    table.data-table {
        display: block;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        font-size: 0.875rem;
    }

    table.data-table thead {
        display: none;
    }

    table.data-table tbody,
    table.data-table tr,
    table.data-table td {
        display: block;
        width: 100%;
    }

    table.data-table tr {
        margin-bottom: 1rem;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 1rem;
        box-shadow: var(--shadow-sm);
    }

    table.data-table td {
        border: none;
        padding: 0.5rem 0;
        color: var(--text-primary);
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        word-break: break-word;
    }

    table.data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        flex: 0 0 40%;
        max-width: 45%;
        padding-left: 0.75rem;
    }

    table.data-table td>* {
        max-width: 60%;
    }

    .action-buttons {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .product-view-title {
        font-size: 1.5rem;
    }

    .purchase-actions {
        flex-direction: column;
    }
}

/* Product View Page */
.product-view-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.product-view-main {
    grid-column: 1 / -1;
}

.product-view-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.product-image-large {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    box-shadow: var(--shadow-lg);
}

.product-view-info {
    padding: 1rem 0;
}

.product-view-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.product-view-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.product-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    font-weight: 600;
}

.product-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent-orange);
    font-weight: 600;
}

.product-view-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.price-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.product-view-description h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.product-view-description p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all var(--transition-fast);
}

.back-link:hover {
    color: var(--accent-purple);
    transform: translateX(-5px);
}

/* Customization Section */
.product-view-customization {
    margin-top: 2rem;
}

.customization-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.customization-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.customization-header h3 i {
    color: var(--accent-purple);
}

.customization-subtitle {
    color: var(--text-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group label i {
    color: var(--accent-blue);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* File Preview */
.file-preview-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.file-preview-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-preview-box {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.file-preview-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
    min-height: 300px;
    box-shadow: var(--shadow-sm);
}

.preview-header {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.preview-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.preview-info h5 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.preview-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.preview-info span {
    font-weight: 600;
    color: var(--accent-blue);
}

.preview-body {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Linked File Info */
.linked-file-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.linked-file-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.linked-file-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.linked-file-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.linked-file-details {
    flex: 1;
}

.linked-file-details h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.linked-file-details p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Purchase Section */
.product-view-purchase {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.purchase-summary {
    margin-bottom: 2rem;
}

.purchase-summary h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--text-secondary);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 2px solid var(--border-color);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.total-price {
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.purchase-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent-red);
    color: white;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.file-search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.file-search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.file-search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.files-list-modal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-item-modal {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.file-item-modal:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
}

.file-icon-modal {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.file-info-modal {
    flex: 1;
}

.file-info-modal h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-info-modal p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.select-file-btn {
    background: var(--accent-blue);
    color: white;
}

.select-file-btn:hover {
    background: var(--accent-purple);
}

@media (max-width: 1024px) {
    .product-view-container {
        grid-template-columns: 1fr;
    }

    .product-view-purchase {
        position: static;
    }

    .product-view-header {
        grid-template-columns: 1fr;
    }

    .product-image-large {
        height: 300px;
    }
}