﻿/* =============================================
   GigFlow - Dashboard CSS
   ============================================= */

.dashboard-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.sidebar-user img { width: 48px; height: 48px; border-radius: 50%; }
.sidebar-user strong { display: block; font-size: 0.9rem; font-weight: 700; }
.role-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: var(--radius-full); font-weight: 600; text-transform: uppercase; }
.role-buyer { background: rgba(99,102,241,0.1); color: var(--primary); }
.role-seller { background: rgba(16,185,129,0.1); color: var(--success); }
.role-admin { background: rgba(239,68,68,0.1); color: var(--danger); }

.sidebar-nav { display: flex; flex-direction: column; padding: 0 12px; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; color: var(--text-muted); transition: var(--transition); }
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(99,102,241,0.08); color: var(--primary); }
.sidebar-nav a i { width: 16px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 0; }
.sidebar-badge { margin-left: auto; background: var(--danger); color: white; font-size: 0.65rem; font-weight: 700; padding: 2px 6px; border-radius: 999px; min-width: 18px; text-align: center; }
.sidebar-balance { margin-left: auto; font-size: 0.75rem; font-weight: 700; color: var(--success); }

/* Main */
.dashboard-main { padding: 32px; background: var(--bg-secondary); }
.dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }
.dashboard-header h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.dashboard-header p { color: var(--text-muted); font-size: 0.875rem; }

/* Stat Cards */
.stats-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; transition: var(--transition); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: white; flex-shrink: 0; }
.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-info { background: var(--info); }
.stat-card h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 2px; }
.stat-card p { font-size: 0.8rem; color: var(--text-muted); }

/* Dashboard Section */
.dashboard-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.dashboard-section .section-header { margin-bottom: 20px; }

/* Orders Table */
.orders-table { overflow-x: auto; }
.orders-table table { width: 100%; border-collapse: collapse; }
.orders-table th { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.orders-table td { padding: 14px 12px; font-size: 0.875rem; border-bottom: 1px solid var(--border); }
.orders-table tr:last-child td { border-bottom: none; }
.orders-table a { color: var(--primary); font-weight: 600; }

/* Status Badges */
.status-badge { padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.status-pending { background: rgba(245,158,11,0.1); color: #d97706; }
.status-active { background: rgba(59,130,246,0.1); color: #2563eb; }
.status-delivered { background: rgba(139,92,246,0.1); color: #7c3aed; }
.status-completed { background: rgba(16,185,129,0.1); color: #059669; }
.status-cancelled { background: rgba(239,68,68,0.1); color: #dc2626; }
.status-disputed { background: rgba(249,115,22,0.1); color: #ea580c; }

/* Empty State */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state i { font-size: 3rem; color: var(--text-light); margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.875rem; }

/* Become Seller CTA */
.become-seller-cta { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: var(--radius); padding: 24px 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.become-seller-cta h3 { font-size: 1.1rem; font-weight: 700; color: white; margin-bottom: 4px; }
.become-seller-cta p { color: rgba(255,255,255,0.8); font-size: 0.875rem; }
.become-seller-cta .btn-primary { background: white; color: var(--primary); flex-shrink: 0; }

/* Flash Messages */
.flash-message { position: fixed; top: 90px; right: 20px; z-index: 9999; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; font-size: 0.875rem; font-weight: 500; transition: opacity 0.3s; min-width: 280px; }
.flash-success { border-left: 4px solid var(--success); }
.flash-success i { color: var(--success); }
.flash-danger { border-left: 4px solid var(--danger); }
.flash-danger i { color: var(--danger); }

/* Responsive */
@media (max-width: 1024px) { .stats-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .dashboard-wrapper { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .dashboard-main { padding: 20px; }
    .stats-cards { grid-template-columns: repeat(2, 1fr); }
    .become-seller-cta { flex-direction: column; text-align: center; }
}
