/* UserDashboard Modern Styles - Sidebar Layout */

/* ========================================
   SIDEBAR LAYOUT
   ======================================== */

/* Sidebar Container */
.left-sidebar {
    width: 240px;
    background-color: #ffffff;
    border-right: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

/* Sidebar Header */
.left-sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #E5E7EB;
}

/* Sidebar Navigation */
.left-sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

/* Section Titles */
.left-sidebar-section-title {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6B7280;
    letter-spacing: 0.05em;
}

/* Sidebar Links */
.left-sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.125rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4B5563;
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
}

.left-sidebar-link:hover {
    background-color: #F3F4F6;
    color: #1F2937;
}

.left-sidebar-link.active {
    background-color: #EFF6FF;
    color: #2563EB;
    font-weight: 600;
}

.left-sidebar-link-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Upgrade Link Special Style */
.left-sidebar-link-upgrade {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    color: white;
    font-weight: 600;
}

.left-sidebar-link-upgrade:hover {
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Sidebar Footer */
.left-sidebar-footer {
    padding: 1rem 0.5rem;
    border-top: 1px solid #E5E7EB;
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    min-width: 0;
}

.content-header {
    background-color: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.content-subtitle {
    font-size: 0.875rem;
    color: #6B7280;
    margin-top: 0.25rem;
}

.content-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

/* ========================================
   RESPONSIVE SIDEBAR
   ======================================== */

@media (max-width: 1024px) {
    .left-sidebar {
        position: fixed;
        left: -240px;
        z-index: 50;
        transition: left 0.3s;
    }
    
    .left-sidebar.open {
        left: 0;
    }
    
    .main-content {
        width: 100%;
    }
}

/* ========================================
   LEGACY STYLES (keeping for compatibility)
   ======================================== */

/* Navigation Tabs */
.dashboard-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4B5563;
    border-radius: 0.5rem;
    transition: all 0.2s;
    position: relative;
}

.dashboard-nav-link:hover {
    color: #2563EB;
    background-color: #EFF6FF;
}

.dashboard-nav-link.active {
    color: #2563EB;
    background-color: #EFF6FF;
    font-weight: 600;
}

.dashboard-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px 2px 0 0;
}

/* Stats Cards */
.stat-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #F3F4F6;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1);
}

.stat-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-card-icon.blue {
    background: linear-gradient(to bottom right, #3B82F6, #4F46E5);
}

.stat-card-icon.green {
    background: linear-gradient(to bottom right, #10B981, #14B8A6);
}

.stat-card-icon.purple {
    background: linear-gradient(to bottom right, #8B5CF6, #EC4899);
}

.stat-card-icon.orange {
    background: linear-gradient(to bottom right, #F59E0B, #EF4444);
}

.stat-card-icon.gray {
    background: linear-gradient(to bottom right, #9CA3AF, #6B7280);
}

/* Progress Bars */
.progress-bar-container {
    width: 100%;
    background-color: #E5E7EB;
    border-radius: 9999px;
    height: 0.75rem;
    overflow: hidden;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.progress-bar {
    height: 0.75rem;
    border-radius: 9999px;
    transition: all 0.5s ease-out;
}

.progress-bar.blue {
    background: linear-gradient(to right, #3B82F6, #4F46E5);
}

.progress-bar.green {
    background: linear-gradient(to right, #10B981, #14B8A6);
}

.progress-bar.yellow {
    background: linear-gradient(to right, #FBBF24, #F59E0B);
}

.progress-bar.red {
    background: linear-gradient(to right, #EF4444, #EC4899);
}

/* Limit Cards */
.limit-card {
    background-color: #F9FAFB;
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #E5E7EB;
    transition: all 0.2s;
}

.limit-card:hover {
    border-color: #93C5FD;
    background-color: #EFF6FF;
}

.limit-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.limit-badge.unlimited {
    background-color: #D1FAE5;
    color: #047857;
    border: 1px solid #6EE7B7;
}

.limit-badge.available {
    background-color: #DBEAFE;
    color: #1D4ED8;
    border: 1px solid #93C5FD;
}

.limit-badge.low {
    background-color: #FEF3C7;
    color: #B45309;
    border: 1px solid #FCD34D;
}

.limit-badge.exhausted {
    background-color: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #FCA5A5;
}

/* Subscription Status Badge */
.subscription-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.subscription-badge.free {
    background: linear-gradient(to right, #F3F4F6, #E5E7EB);
    color: #374151;
    border: 2px solid #D1D5DB;
}

.subscription-badge.premium {
    background: linear-gradient(to right, #FBBF24, #F59E0B);
    color: #ffffff;
    border: 2px solid #D97706;
}

.subscription-badge.admin {
    background: linear-gradient(to right, #8B5CF6, #EC4899);
    color: #ffffff;
    border: 2px solid #7C3AED;
}

/* Activity Chart */
.chart-container {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #F3F4F6;
    padding: 1.5rem;
}

.chart-bar {
    background: linear-gradient(to top, #3B82F6, #60A5FA);
    border-radius: 0.5rem 0.5rem 0 0;
    transition: all 0.3s;
    cursor: pointer;
}

.chart-bar:hover {
    background: linear-gradient(to top, #2563EB, #3B82F6);
    transform: scaleY(1.05);
}

/* Download History Table */
.download-table {
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #F3F4F6;
    overflow: hidden;
}

.download-table thead {
    background: linear-gradient(to right, #F9FAFB, #F3F4F6);
    border-bottom: 2px solid #E5E7EB;
}

.download-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.download-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: #111827;
    border-bottom: 1px solid #F3F4F6;
}

.download-table tr:hover {
    background-color: #EFF6FF;
    transition: background-color 0.15s;
}

/* Status Indicators */
.status-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    display: inline-block;
    margin-right: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.status-dot.success {
    background-color: #10B981;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-dot.failed {
    background-color: #EF4444;
}

.status-dot.processing {
    background-color: #F59E0B;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Platform Badges */
.platform-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.platform-badge.youtube {
    background: linear-gradient(to right, #FEE2E2, #FECACA);
    color: #B91C1C;
    border: 1px solid #FCA5A5;
}

.platform-badge.instagram {
    background: linear-gradient(to right, #FCE7F3, #F3E8FF);
    color: #7C3AED;
    border: 1px solid #C084FC;
}

.platform-badge.tiktok {
    background: linear-gradient(to right, #F3F4F6, #E5E7EB);
    color: #374151;
    border: 1px solid #D1D5DB;
}

.platform-badge.other {
    background: linear-gradient(to right, #DBEAFE, #BFDBFE);
    color: #1D4ED8;
    border: 1px solid #93C5FD;
}

/* Quality Badges */
.quality-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.quality-badge.uhd {
    background-color: #7C3AED;
    color: #ffffff;
}

.quality-badge.fhd {
    background-color: #2563EB;
    color: #ffffff;
}

.quality-badge.hd {
    background-color: #059669;
    color: #ffffff;
}

.quality-badge.sd {
    background-color: #D97706;
    color: #ffffff;
}

.quality-badge.low {
    background-color: #6B7280;
    color: #ffffff;
}

/* Action Buttons */
.btn-primary {
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, #2563EB, #4F46E5);
    color: #ffffff;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(to right, #1D4ED8, #4338CA);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    padding: 0.5rem 1rem;
    border: 2px solid #D1D5DB;
    color: #374151;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #F9FAFB;
    border-color: #9CA3AF;
}

.btn-success {
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, #059669, #14B8A6);
    color: #ffffff;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-success:hover {
    background: linear-gradient(to right, #047857, #0D9488);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, #DC2626, #EC4899);
    color: #ffffff;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-danger:hover {
    background: linear-gradient(to right, #B91C1C, #DB2777);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-state-icon {
    font-size: 3.75rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: #6B7280;
    margin-bottom: 1.5rem;
}

/* Loading States */
.skeleton {
    background-color: #E5E7EB;
    border-radius: 0.375rem;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-text {
    height: 1rem;
    background-color: #E5E7EB;
    border-radius: 0.375rem;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-card {
    height: 8rem;
    background-color: #E5E7EB;
    border-radius: 0.75rem;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
    
    .download-table th,
    .download-table td {
        padding: 0.75rem;
        font-size: 0.75rem;
    }
}

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

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

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Tooltips */
.tooltip {
    position: absolute;
    z-index: 10;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffffff;
    background-color: #111827;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip.show {
    opacity: 1;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.section-header::before {
    content: '';
    width: 0.25rem;
    height: 1.5rem;
    background: linear-gradient(to bottom, #3B82F6, #8B5CF6);
    border-radius: 9999px;
    margin-right: 0.75rem;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s;
}

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