/* Modern Corporate Seller Dashboard Design */

/* CSS Variables for Corporate Design */
:root {
    /* Corporate Color Palette */
    --primary: #1e3a8a;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --secondary-light: #94a3b8;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Layout Variables */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;
    --container-padding: 2rem;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Seller Dashboard Layout */
.seller-dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Styles */
.seller-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-xl);
}

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

.seller-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
}

.seller-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.seller-logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.seller-logo-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    transition: var(--transition);
}

.seller-sidebar.collapsed .seller-logo-text {
    opacity: 0;
    visibility: hidden;
}

.seller-sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.seller-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar Navigation */
.seller-sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.seller-sidebar.collapsed .nav-section-title {
    opacity: 0;
    visibility: hidden;
    height: 0;
    padding: 0;
}

.nav-item {
    margin: 0.25rem 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-text {
    transition: var(--transition);
}

.seller-sidebar.collapsed .nav-text {
    opacity: 0;
    visibility: hidden;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: var(--white);
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
}

.seller-sidebar.collapsed .nav-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 0.125rem 0.25rem;
    font-size: 10px;
}

/* Main Content Area */
.seller-main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
.seller-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 2rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-900);
}

.header-subtitle {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.search-bar {
    position: relative;
    max-width: 400px;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-sm);
    transition: var(--transition);
    background: var(--gray-50);
}

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

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: var(--font-size-sm);
}

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

.header-action {
    position: relative;
    background: none;
    border: none;
    color: var(--gray-600);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.header-action:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--white);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu:hover {
    background: var(--gray-50);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.2;
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    line-height: 1.2;
}

/* Dashboard Content */
.seller-dashboard-content {
    padding: var(--container-padding);
    flex: 1;
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.stat-card.success::before {
    background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
}

.stat-card.warning::before {
    background: linear-gradient(90deg, var(--warning) 0%, #fbbf24 100%);
}

.stat-card.danger::before {
    background: linear-gradient(90deg, var(--danger) 0%, #f87171 100%);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #fbbf24 100%);
}

.stat-icon.danger {
    background: linear-gradient(135deg, var(--danger) 0%, #f87171 100%);
}

.stat-change {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action-btn {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--gray-700);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

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

.quick-action-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

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

.chart-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
}

.chart-options {
    display: flex;
    gap: 0.5rem;
}

.chart-option {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    color: var(--gray-600);
    font-size: var(--font-size-xs);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.chart-option:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chart-option.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Activity Section */
.activity-section {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

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

.activity-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-icon.primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.activity-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.activity-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title-text {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    font-size: var(--font-size-sm);
}

.activity-description {
    color: var(--gray-600);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.activity-time {
    color: var(--gray-400);
    font-size: var(--font-size-xs);
    white-space: nowrap;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .seller-sidebar {
        transform: translateX(-100%);
    }
    
    .seller-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .seller-main-content {
        margin-left: 0;
    }
    
    .seller-header {
        padding: 0 1rem;
    }
    
    .seller-dashboard-content {
        padding: 1rem;
    }
    
    .header-left {
        gap: 1rem;
    }
    
    .search-bar {
        display: none;
    }
    
    .header-title {
        font-size: var(--font-size-xl);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--primary);
        color: var(--white);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: var(--border-radius);
        cursor: pointer;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: var(--font-size-2xl);
    }
    
    .chart-container {
        height: 250px;
    }
}

/* Mobile Menu Toggle (Hidden on Desktop) */
.mobile-menu-toggle {
    display: none;
}

/* Overlay for mobile sidebar */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

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

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

.seller-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

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

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

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

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

/* Print Styles */
@media print {
    .seller-sidebar,
    .seller-header,
    .mobile-menu-toggle {
        display: none;
    }
    
    .seller-main-content {
        margin-left: 0;
    }
    
    .seller-dashboard-content {
        padding: 0;
    }
}
