:root {
    /* Pure deep dark background */
    --bg-color: #06080c; 
    
    /* Neon Accents */
    --accent-purple: #a855f7; 
    --accent-blue: #3b82f6; 
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    
    /* Glass Panels */
    --panel-bg: rgba(20, 25, 35, 0.5);
    --panel-bg-heavy: rgba(15, 18, 25, 0.85);
    --panel-border: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    
    --font-main: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-size: 14px;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Glowing Orbs */
.app-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
}
.glow-orb { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.15; }
.orb-1 { width: 500px; height: 500px; background: var(--accent-purple); top: -100px; left: -100px; }
.orb-2 { width: 600px; height: 600px; background: var(--accent-blue); bottom: -100px; right: 10%; }

/* Utilities */
a { text-decoration: none; color: inherit; }

/* Glassmorphism */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}
.glass-panel-heavy {
    background: var(--panel-bg-heavy);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* App Structure */
.app-container { display: flex; min-height: 100vh; padding: 16px; gap: 24px; }

/* Detached Sidebar */
.sidebar-wrapper { width: 260px; flex-shrink: 0; }
.sidebar {
    position: sticky; top: 16px; height: calc(100vh - 32px);
    padding: 24px 20px; display: flex; flex-direction: column; gap: 32px;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 36px; height: 36px;
    background: transparent;
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: white;
}
.logo h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.5px; }

/* Dropdowns */
.project-switcher label {
    display: block; font-size: 0.75rem; text-transform: uppercase;
    color: var(--text-secondary); margin-bottom: 8px; font-weight: 600; letter-spacing: 1px;
}
.select-wrapper { position: relative; }
.select-wrapper select {
    width: 100%; padding: 12px 32px 12px 16px;
    background: rgba(0, 0, 0, 0.2); border: 1px solid var(--panel-border);
    color: var(--text-primary); border-radius: 10px; appearance: none;
    font-family: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s;
}
.select-wrapper i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }
.select-wrapper select:hover { border-color: var(--accent-blue); background: rgba(0,0,0,0.4); }
.select-wrapper select option { background: #0f111a; color: white; }

/* Navigation */
.nav-menu ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.nav-menu li a {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 10px;
    color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; transition: all 0.2s;
}
.nav-menu li a i { font-size: 1.2rem; }
.nav-menu li a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }
.nav-menu li.active a {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), transparent);
    color: var(--text-primary); border-left: 3px solid var(--accent-blue);
}
.nav-menu li.active a i { color: var(--accent-blue); }

.sidebar-footer { margin-top: auto; }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* Top Header */
.header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 32px; gap: 24px;
}
.header-search {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; border-radius: 30px; /* Pill shape */
    flex: 1; max-width: 500px;
}
.header-search i { color: var(--text-secondary); font-size: 1.2rem; }
.header-search input {
    background: transparent; border: none; color: var(--text-primary);
    font-size: 0.95rem; outline: none; width: 100%;
}
.header-profile {
    display: flex; align-items: center; gap: 16px;
    padding: 8px 20px 8px 12px; border-radius: 30px;
}
.user-name { font-weight: 500; font-size: 0.9rem; }
.icon-btn {
    background: transparent; border: none; color: var(--text-secondary);
    font-size: 1.4rem; cursor: pointer; transition: color 0.2s; display: flex; align-items: center;
}
.icon-btn:hover { color: var(--text-primary); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: url('https://i.pravatar.cc/150?img=11') center/cover; }

/* Dashboard Content */
.dashboard-content { width: 100%; }
.page-title { font-size: 1.6rem; margin-bottom: 24px; font-weight: 600; }

/* 4 Stats Cards */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stats-grid { margin-bottom: 24px; }
.stat-card { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.stat-header { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-icon-wrapper {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.stat-icon-wrapper.purple { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.stat-icon-wrapper.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-icon-wrapper.red { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); border: 1px solid rgba(239, 68, 68, 0.3); }
.stat-icon-wrapper.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); border: 1px solid rgba(59, 130, 246, 0.3); }

.stat-trend { font-size: 0.8rem; font-weight: 600; padding: 4px 8px; border-radius: 20px; background: rgba(255,255,255,0.05); }
.stat-trend.positive { color: var(--accent-green); }
.stat-trend.negative { color: var(--accent-red); }

.stat-info { display: flex; flex-direction: column; gap: 4px; }
.stat-title { color: var(--text-secondary); font-size: 0.8rem; font-weight: 500; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: white; }

/* Progress Bars */
.progress-track { width: 100%; height: 6px; background: rgba(0,0,0,0.3); border-radius: 10px; overflow: hidden; margin-top: 4px; }
.progress-fill { height: 100%; border-radius: 10px; }
.purple-fill { background: var(--accent-purple); box-shadow: 0 0 10px var(--accent-purple); }
.green-fill { background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.red-fill { background: var(--accent-red); box-shadow: 0 0 10px var(--accent-red); }
.blue-fill { background: var(--accent-blue); box-shadow: 0 0 10px var(--accent-blue); }

/* Charts */
.grid-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; } /* Pie chart takes 1/3, Line chart takes 2/3 */
.charts-grid { margin-bottom: 24px; }
.chart-container { padding: 24px; display: flex; flex-direction: column; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.chart-header h3 { font-size: 1rem; font-weight: 600; }
.chart-wrapper { width: 100%; flex: 1; min-height: 250px; position: relative; }

/* Table */
.table-container { padding: 24px; }
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.table-header h3 { font-size: 1.1rem; font-weight: 600; }
.search-pill { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px; }
.search-pill input { background: transparent; border: none; color: white; outline: none; font-size: 0.85rem; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 16px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
.data-table th { color: var(--text-secondary); font-weight: 500; font-size: 0.8rem; }
.data-table tbody tr { transition: background 0.2s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

.url-cell { font-family: monospace; font-size: 0.95rem; color: #e2e8f0; }

/* Good Tagging (Pills) */
.tag { padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; margin-right: 4px; display: inline-block; }
.tag-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.tag-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }
.tag-orange { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.tag-gray { background: rgba(255, 255, 255, 0.1); color: #cbd5e1; border: 1px solid rgba(255,255,255,0.2); }

/* Status Pills */
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; background: rgba(0,0,0,0.3); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.status-success { color: var(--accent-green); border: 1px solid rgba(16,185,129,0.2); }
.status-success .dot { background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }
.status-danger { color: var(--accent-red); border: 1px solid rgba(239,68,68,0.2); }
.status-danger .dot { background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
.status-neutral { color: var(--text-secondary); border: 1px solid var(--panel-border); }
.status-warning { color: var(--accent-orange); border: 1px solid rgba(245,158,11,0.2); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 0.9rem;
    cursor: pointer; border: none; transition: all 0.2s; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--accent-blue), #2563eb); color: #fff; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6); }
.btn-sm { padding: 6px 10px; border-radius: 8px; }
.btn-outline { background: transparent; border: 1px solid var(--panel-border); color: var(--text-secondary); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: white; }
.w-100 { width: 100%; }

/* Auth & Form Styles */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 420px; padding: 40px; display: flex; flex-direction: column; gap: 24px; text-align: center; }
.auth-header h1 { font-size: 1.8rem; margin-bottom: 8px; }
.auth-header p { color: var(--text-secondary); font-size: 0.95rem; }
.form-group { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.form-control {
    width: 100%; padding: 14px 16px; background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border); color: white; border-radius: 10px;
    font-size: 0.95rem; outline: none; transition: all 0.2s; font-family: inherit;
}
.form-control:focus { border-color: var(--accent-blue); background: rgba(0,0,0,0.4); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.auth-footer { margin-top: 16px; font-size: 0.9rem; color: var(--text-secondary); }
.auth-footer a { color: var(--accent-blue); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
