:root {
    --bg-luxury: #0a0c10;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-accent: #3b82f6;
    --secondary-accent: #a855f7;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --green-accent: #10b981;
    --red-accent: #ef4444;
}

body.light-mode {
    --bg-luxury: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary-accent: #2563eb;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-luxury);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,0.1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,0.05) 0, transparent 50%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: all 0.4s ease;
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 100%;
    max-width: 1200px;
    height: 850px;
    display: grid;
    grid-template-columns: 240px 1fr;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Sidebar Styling */
.sidebar {
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--glass-border);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
}

nav {
    flex-grow: 1;
}

.nav-item {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    text-align: left;
    font-size: 15px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item.active, .nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-accent);
}

.demo-btn-sidebar {
    width: 100%;
    margin-top: 30px;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: 0.3s;
}

.demo-btn-sidebar:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(59, 130, 246, 0.5); }

.user-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #475569;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-muted); }

/* Main Content */
.main-content {
    padding: 40px;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.date-display { color: var(--text-muted); font-size: 14px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: 20px;
}

.stat-card .label { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; display: block; }
.stat-card h2 { font-size: 28px; font-weight: 700; }
.trend { font-size: 12px; padding: 4px 8px; border-radius: 20px; display: inline-block; margin-top: 8px; }
.trend.up { background: rgba(16, 185, 129, 0.1); color: var(--green-accent); }

/* Dashboard Body */
.dashboard-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
}

.chart-wrapper {
    position: relative;
    width: 200px;
    margin: 30px auto;
}

.circular-chart { display: block; width: 100%; stroke-linecap: round; }
.circle-bg { stroke: rgba(255,255,255,0.05); stroke-width: 2.8; fill: none; }
.circle {
    fill: none;
    stroke-width: 2.5;
    stroke: var(--primary-accent);
    transition: stroke-dasharray 0.8s ease-in-out;
}

.chart-info {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.percent { font-size: 32px; font-weight: 700; display: block; }
.subtext { font-size: 11px; color: var(--text-muted); }

/* Bar Chart */
.bar-chart-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    width: 60px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
}

.bar-track {
    flex: 1;
    height: 24px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
    min-width: 4px;
}

.bar-value {
    width: 80px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

/* Transactions */
.header-inline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.add-btn {
    background: var(--primary-accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.transaction-list { display: flex; flex-direction: column; gap: 12px; }
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.item-info { display: flex; gap: 12px; align-items: center; }
.icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.item-name { font-size: 14px; font-weight: 600; }
.item-cat { font-size: 11px; color: var(--text-muted); }
.item-amount { font-weight: 700; color: var(--red-accent); }

/* Form */
.hidden { display: none !important; }
.input-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.input-form input, .input-form select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px;
    border-radius: 8px;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }

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

.analytics-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-wrapper.large { width: 240px; margin: 20px 0; }

.analytics-flex {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
    margin: 30px 0;
}

.category-stat {
    border-left: 4px solid var(--primary-accent);
    padding-left: 15px;
}

.advice-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--primary-accent);
}

.theme-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    margin-right: 15px;
}

.top-actions { display: flex; align-items: center; }

.full-width { grid-column: 1 / -1; }

/* Line Chart */
.line-chart-container {
    margin: 30px 0;
    padding: 20px;
    background: rgba(0,0,0,0.1);
    border-radius: 16px;
}
.line-chart { width: 100%; height: 150px; }
.chart-labels { display: flex; justify-content: space-between; padding: 0 10px; margin-top: 10px; color: var(--text-muted); font-size: 11px; }

/* Account View */
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}
.profile-section { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.large-avatar {
    width: 100px; height: 100px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border-radius: 30px;
    display: flex; justify-content: center; align-items: center;
    font-size: 36px; font-weight: 700; color: white;
}
.badge-list { display: flex; gap: 8px; margin-top: 10px; }
.badge { background: var(--primary-accent); color: white; padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; }

.setting-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 0; border-bottom: 1px solid var(--glass-border);
}

.icon-btn-small {
    background: transparent; border: none; cursor: pointer; font-size: 14px; opacity: 0.6; transition: 0.2s;
}
.icon-btn-small:hover { opacity: 1; transform: scale(1.1); }
