:root {
    --bg-primary: #0a0c10;
    --bg-secondary: #14171d;
    --sidebar-bg: #111419;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-cyan: #22d3ee;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --card-glass: rgba(30, 41, 59, 0.4);
    --border-glass: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --error: #ef4444;
    --gold: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: #fff;
    letter-spacing: 1px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 8px;
    transform: rotate(45deg);
}

.nav-menu {
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item i {
    width: 20px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.sidebar-footer {
    padding-top: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-plan {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2rem;
    background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0a0c10 100%);
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    width: 400px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    color: #fff;
    outline: none;
    transition: 0.3s;
}

.search-box input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.btn {
    padding: 0.7rem 1.2rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

/* Glass Cards */
.glass {
    background: var(--card-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
}

.hero-section {
    margin-bottom: 2rem;
}

.welcome-text h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.trend-up {
    color: var(--success);
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.stat-icon {
    color: var(--accent-cyan);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-footer {
    font-size: 0.85rem;
}

.stat-card.gold .stat-value {
    color: var(--gold);
}

.trend.up { color: var(--success); }
.trend.down { color: var(--error); }

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    padding: 1.5rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-tabs {
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: 8px;
    display: flex;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
}

.tab-btn.active {
    background: var(--bg-primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Data Section */
.data-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.list-container, .market-container {
    padding: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-all {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 10px;
    border-radius: 12px;
    transition: background 0.2s;
}

.transaction-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.item-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.item-icon.apple { background: rgba(255,255,255,0.05); color: #fff; }
.item-icon.divider { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.item-icon.tech { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }

.item-details { flex: 1; }
.item-name { font-weight: 600; margin-bottom: 2px; }
.item-date { font-size: 0.8rem; color: var(--text-muted); }
.item-amount { font-weight: 700; color: #fff; }

.stock-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stock-mini-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
}

.stock-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.stock-symbol {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stock-price {
    font-size: 1rem;
    font-weight: 700;
}

.stock-change {
    font-size: 0.85rem;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-section { grid-template-columns: 1fr; }
    .data-section { grid-template-columns: 1fr; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
