/* Base Styles and Design System */
:root {
    --bg-color: #0c0e12;
    --sidebar-bg: #151921;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --glass-blur: blur(12px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Glassmorphism Utility */
.glass {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
}

/* Layout */
.sidebar {
    width: 260px;
    height: 100%;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent 400px),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.05), transparent 400px);
}

header {
    height: 70px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    background: rgba(12, 14, 18, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

/* Widgets */
.stat-card {
    padding: 1.5rem;
    border-radius: 1.25rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.2);
}

.stat-card .label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .value {
    font-size: 1.875rem;
    font-weight: 700;
}

.stat-card .trend {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trend.up { color: #10b981; }
.trend.down { color: #ef4444; }

/* Navigation */
.nav-links {
    list-style: none;
    margin-top: 2rem;
}

.nav-item {
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.nav-item:hover, .nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-main);
}

.nav-item.active {
    border-left: 3px solid var(--accent-primary);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

/* Settings Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal {
    width: 450px;
    padding: 2rem;
    border-radius: 1.5rem;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-main);
}

button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    background: var(--accent-primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

button:hover {
    filter: brightness(1.1);
}
