/* Dark Mode Glassmorphism Dashboard Styles */
:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(17, 24, 39, 0.7);
    --border-color: rgba(55, 65, 81, 0.5);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --blue-glow: #3b82f6;
    --blue-glow-soft: rgba(59, 130, 246, 0.3);
    --success-green: #10b981;
    --warning-amber: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(75, 85, 99, 0.7);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue-glow);
    border-color: var(--blue-glow-soft);
    box-shadow: 0 0 20px var(--blue-glow-soft);
}

.nav-icon {
    width: 20px;
    height: 20px;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.dashboard-header {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.breadcrumb-separator {
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.credit-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid var(--border-color);
}

/* Dashboard Content */
.dashboard-content {
    padding: 2rem;
    flex: 1;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-trend {
    color: var(--success-green);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* API Keys Section */
.api-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.api-key-container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.api-key-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.api-key-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(55, 65, 81, 0.5);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(75, 85, 99, 0.6);
}

.warning-text {
    color: var(--warning-amber);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Upload Zone */
.upload-zone {
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.upload-zone:hover {
    border-color: var(--blue-glow);
    background: rgba(59, 130, 246, 0.05);
}

.upload-zone.drag-over {
    border-color: var(--blue-glow);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--blue-glow);
}

.upload-text {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Chart Container */
.chart-container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    min-height: 300px;
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    color: var(--text-secondary);
}

/* Simple Bar Chart */
.simple-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    gap: 0.5rem;
    padding: 1rem 0;
}

.chart-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(180deg, #3b82f6, #1e40af);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
    min-height: 20px;
}

.chart-bar:hover {
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.chart-label {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chart-value {
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
}

.hamburger-icon {
    width: 24px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: #f9fafb;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.sidebar-overlay.active {
    display: block;
}

/* Responsive - Tablet & Mobile */
@media (max-width: 1024px) {
    .mobile-nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(59, 130, 246, 0.15);
        border-radius: 8px;
    }

    .sidebar {
        display: block !important;
        position: fixed !important;
        left: -300px !important;
        top: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        z-index: 1001 !important;
        transition: left 0.3s ease !important;
        background: #111827 !important;
        border-right: 1px solid rgba(55, 65, 81, 0.5) !important;
        padding: 1.5rem !important;
        overflow-y: auto !important;
        transform: none !important;
    }

    .sidebar.mobile-open {
        left: 0 !important;
    }
    
    .sidebar .sidebar-logo {
        display: block !important;
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 2rem;
        color: #3b82f6;
        background: none;
        -webkit-text-fill-color: #3b82f6;
    }
    
    .sidebar .nav-links {
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .sidebar .nav-link {
        display: flex !important;
        align-items: center;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
        border-radius: 10px;
        color: #9ca3af !important;
        text-decoration: none;
        font-size: 0.95rem;
    }
    
    .sidebar .nav-link:hover,
    .sidebar .nav-link.active {
        background: rgba(59, 130, 246, 0.15);
        color: #3b82f6 !important;
    }

    .main-content {
        margin-left: 0;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .breadcrumbs {
        display: none;
    }

    .header-right {
        margin-left: auto;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .api-key-input-group {
        flex-direction: column;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

