/* Developer Dashboard Styles */
:root {
    --sidebar-width: 280px;
    --dashboard-bg: #030014;
    --primary: var(--accent-primary);
    --text-muted: var(--text-secondary);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--dashboard-bg);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.sidebar-nav {
    padding: 2rem 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.nav-item:hover, .nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    border-left: 3px solid var(--primary);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-plan {
    font-size: 0.75rem;
    color: var(--primary);
}

.user-plan-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upgrade-link {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.upgrade-link:hover {
    background: var(--primary);
    color: white;
}

.stripe-notification {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-left: 1rem;
    animation: fadeIn 0.3s ease;
}

.stripe-notification.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.stripe-notification.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Main Content */
.dashboard-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
}

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

.dashboard-header h1 {
    font-size: 1.8rem;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.stat-change {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.neutral {
    color: var(--text-muted);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.dashboard-section {
    padding: 1.5rem;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-heading h2 {
    font-size: 1.2rem;
    margin: 0;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
}

/* API Key List */
.api-key-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.key-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.key-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.key-value {
    font-size: 0.8rem;
    font-family: monospace;
    color: var(--text-secondary);
}

.key-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.action-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.action-btn.danger:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.action-btn.success {
    color: var(--positive);
    background: rgba(52, 211, 153, 0.12);
}

/* Activity Feed */
.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.activity-feed li {
    display: flex;
    gap: 1rem;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.activity-icon.sync {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.activity-details p {
    margin: 0 0 0.3rem 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.activity-details strong {
    color: var(--text-primary);
}

.activity-details .time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.activity-empty,
.knowledge-empty {
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.35rem 0;
}

.knowledge-section {
    grid-column: 1 / -1;
}

.knowledge-search {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.knowledge-input {
    flex: 1;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.knowledge-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.knowledge-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-1px);
}

.knowledge-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.96rem;
    line-height: 1.35;
}

.knowledge-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.45;
}

.knowledge-meta {
    margin-top: 0.7rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 900px) {
    .dashboard-layout {
        flex-direction: column;
    }
    
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
    }
    
    .dashboard-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
