/* Dashboard Custom Styles */

:root {
    --primary: #198754;
    --primary-light: #d1e7dd;
    --primary-dark: #0f5132;
    --secondary: #6c757d;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #0dcaf0;
    --purple: #6f42c1;
    --pink: #d63384;
    --dark: #212529;
    --light: #f8f9fa;
    --border-radius: 16px;
    --box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Header */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: var(--box-shadow);
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.1;
}

.header-content {
    position: relative;
    z-index: 2;
}

.dashboard-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
}

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

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
}

.stat-card.revenue::before { background: linear-gradient(to bottom, var(--success), var(--primary-light)); }
.stat-card.orders::before { background: linear-gradient(to bottom, var(--info), #a5d8ff); }
.stat-card.profit::before { background: linear-gradient(to bottom, var(--purple), #d0bfff); }
.stat-card.expenses::before { background: linear-gradient(to bottom, var(--warning), #ffd8a8); }

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 25px;
    color: white;
}

.stat-icon.revenue { background: linear-gradient(135deg, var(--success), #20c997); }
.stat-icon.orders { background: linear-gradient(135deg, var(--info), #3bc9db); }
.stat-icon.profit { background: linear-gradient(135deg, var(--purple), #9775fa); }
.stat-icon.expenses { background: linear-gradient(135deg, var(--warning), #ffa94d); }

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 5px;
    color: var(--dark);
}

.stat-label {
    font-size: 0.95rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* Marketing Expenses Section */
.marketing-section {
    margin-bottom: 30px;
}

.marketing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.marketing-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

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

.marketing-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: white;
}

.marketing-icon.digital { background: linear-gradient(135deg, #4e54c8, #8f94fb); }
.marketing-icon.social { background: linear-gradient(135deg, #1e88e5, #64b5f6); }
.marketing-icon.print { background: linear-gradient(135deg, #f4511e, #ff8a65); }
.marketing-icon.events { background: linear-gradient(135deg, #8e24aa, #ce93d8); }
.marketing-icon.influencer { background: linear-gradient(135deg, #43a047, #81c784); }

.marketing-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
    font-family: 'Poppins', sans-serif;
}

.marketing-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.marketing-subtitle {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.marketing-progress {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.marketing-progress-bar {
    height: 100%;
    border-radius: 4px;
}

.progress-digital { background: linear-gradient(to right, #4e54c8, #8f94fb); }
.progress-social { background: linear-gradient(to right, #1e88e5, #64b5f6); }
.progress-print { background: linear-gradient(to right, #f4511e, #ff8a65); }
.progress-events { background: linear-gradient(to right, #8e24aa, #ce93d8); }
.progress-influencer { background: linear-gradient(to right, #43a047, #81c784); }

.marketing-total {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
}

.marketing-total-text h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
}

.marketing-total-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.marketing-total-amount {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

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

@media (max-width: 1200px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0,0,0,0.05);
}

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

.chart-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    font-family: 'Poppins', sans-serif;
}

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

/* Tabs Section */
.tabs-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.tabs-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    padding: 0 30px;
}

.tab-btn {
    padding: 20px 30px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    padding: 30px;
    display: none;
}

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

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

.data-table th {
    background: #f8f9fa;
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid #e9ecef;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-confirmed { background: #d1e7dd; color: #0f5132; }
.status-pending { background: #fff3cd; color: #664d03; }
.status-processing { background: #cff4fc; color: #055160; }
.status-shipped { background: #e0cffc; color: #432874; }
.status-delivered { background: #d1e7dd; color: #0f5132; }
.status-cancelled { background: #f8d7da; color: #842029; }

.stock-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stock-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.stock-fill {
    height: 100%;
    border-radius: 4px;
}

.stock-high { background: var(--success); }
.stock-medium { background: var(--warning); }
.stock-low { background: var(--danger); }

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

.action-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.action-btn:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(25, 135, 84, 0.15);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.action-icon.order { background: linear-gradient(135deg, var(--info), #3bc9db); }
.action-icon.stock { background: linear-gradient(135deg, var(--warning), #ffa94d); }
.action-icon.product { background: linear-gradient(135deg, var(--purple), #9775fa); }
.action-icon.report { background: linear-gradient(135deg, var(--danger), #ff6b6b); }

.action-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.action-text p {
    font-size: 0.9rem;
    color: var(--secondary);
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.bulk-actions-bar.active {
    display: flex;
}

.selected-count {
    font-weight: 600;
    color: var(--dark);
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
}

.bulk-select {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: white;
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 150px;
}

.bulk-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.bulk-btn.apply {
    background: var(--primary);
    color: white;
}

.bulk-btn.apply:hover {
    background: var(--primary-dark);
}

.bulk-btn.clear {
    background: white;
    border: 1px solid #dee2e6;
    color: var(--secondary);
}

.bulk-btn.clear:hover {
    background: #f8f9fa;
}

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

/* Status dropdown in table */
.status-dropdown {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 120px;
}

.status-dropdown:focus {
    outline: none;
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 30px 20px;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        flex-direction: column;
        padding: 0;
    }
    
    .tab-btn {
        padding: 15px;
        border-bottom: 1px solid #e9ecef;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .marketing-total {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .bulk-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-select, .bulk-btn {
        width: 100%;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

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

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

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

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

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.success {
    background: var(--success);
    color: white;
}

.notification.error {
    background: var(--danger);
    color: white;
}

.notification.info {
    background: var(--info);
    color: white;
}
