/* FinTrack - Modern Finance Dashboard */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray-900: #0f172a;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --sidebar-width: 260px;
    --topbar-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-100);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    display: block;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
}

.upgrade-card {
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.upgrade-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.upgrade-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upgrade-text {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.upgrade-text strong {
    font-weight: 600;
}

.upgrade-text span {
    opacity: 0.8;
    font-size: 12px;
}


/* Main Wrapper */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 8px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    width: 300px;
}

.search-box i {
    color: var(--gray-400);
    font-size: 14px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    width: 100%;
    color: var(--gray-700);
}

.search-box input::placeholder {
    color: var(--gray-400);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.topbar-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.user-menu:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.user-role {
    font-size: 12px;
    color: var(--gray-500);
}

.user-menu i {
    font-size: 12px;
    color: var(--gray-400);
}

/* Main Content */
.main-content {
    padding: 24px;
    padding-bottom: 100px;
}

/* Welcome Section */
.welcome-section {
    background: var(--gradient-primary);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.welcome-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: 100px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.welcome-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.welcome-greeting {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 4px;
}

.welcome-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
}

.welcome-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
}

.welcome-actions {
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-light {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.btn-light:hover {
    background: rgba(255,255,255,0.3);
}

/* Floating Tip Toast */
.tip-toast {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 340px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid var(--gray-100);
    z-index: 1001;
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tip-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.tip-toast-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 16px;
    flex-shrink: 0;
}

.tip-toast-content {
    flex: 1;
    min-width: 0;
}

.tip-toast-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--warning);
    margin-bottom: 4px;
}

.tip-toast-text {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.5;
    margin: 0;
}

.tip-toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
}

.tip-toast-close:hover {
    color: var(--gray-600);
}


/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.balance {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.stat-icon.income {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-icon.expense {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-icon.savings {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    white-space: nowrap;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
}

.stat-change.positive {
    color: var(--secondary);
}

.stat-change.negative {
    color: var(--danger);
}

.stat-change i {
    font-size: 10px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.card-chart {
    grid-column: span 2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.card-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.card-subtitle {
    font-size: 13px;
    color: var(--gray-500);
}

.card-action {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.card-action:hover {
    text-decoration: underline;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-select {
    padding: 6px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--gray-600);
    background: var(--white);
    cursor: pointer;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Chart Container */
.chart-container {
    height: 220px;
    position: relative;
}

.chart-doughnut {
    height: 240px;
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--gradient-primary);
    transition: width 0.5s ease;
}

.progress-fill.success {
    background: var(--gradient-success);
}

.progress-fill.warning {
    background: var(--gradient-warning);
}

.progress-fill.primary {
    background: var(--gradient-primary);
}

/* Savings Goal */
.savings-goal {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-top: 20px;
}

.savings-goal-info {
    flex: 1;
}

.savings-goal-title {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.savings-goal-amount {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.savings-goal .progress-bar {
    flex: 2;
}

.savings-goal-percent {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}


/* Transactions */
.transactions-list {
    display: flex;
    flex-direction: column;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
}

.transaction-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.transaction-icon.income {
    background: rgba(34, 197, 94, 0.1);
    color: var(--secondary);
}

.transaction-icon.expense {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.transaction-details {
    flex: 1;
    min-width: 0;
}

.transaction-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.transaction-meta {
    font-size: 12px;
    color: var(--gray-500);
}

.transaction-amount {
    font-size: 14px;
    font-weight: 600;
}

.transaction-amount.income {
    color: var(--secondary);
}

.transaction-amount.expense {
    color: var(--danger);
}

/* Net Worth */
.networth-display {
    text-align: center;
    padding: 16px 0;
}

.networth-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.networth-change {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.networth-change.positive {
    color: var(--secondary);
}

.networth-breakdown {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.networth-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-sm);
}

.networth-item.assets {
    background: rgba(34, 197, 94, 0.08);
}

.networth-item.assets i {
    color: var(--secondary);
    font-size: 20px;
}

.networth-item.liabilities {
    background: rgba(239, 68, 68, 0.08);
}

.networth-item.liabilities i {
    color: var(--danger);
    font-size: 20px;
}

.networth-item-content {
    display: flex;
    flex-direction: column;
}

.networth-item-label {
    font-size: 12px;
    color: var(--gray-500);
}

.networth-item-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
}

/* Goals */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.goal-item {
    display: flex;
    gap: 14px;
}

.goal-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.goal-icon.primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.goal-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--secondary);
}

.goal-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.goal-content {
    flex: 1;
    min-width: 0;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.goal-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}

.goal-percent {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.goal-footer {
    margin-top: 6px;
}

.goal-amount {
    font-size: 12px;
    color: var(--gray-500);
}

/* Debts */
.debts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.debt-item {
    display: flex;
    gap: 14px;
}

.debt-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gray-600);
    flex-shrink: 0;
}

.debt-content {
    flex: 1;
    min-width: 0;
}

.debt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.debt-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}

.debt-remaining {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger);
}

.debt-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.debt-paid, .debt-monthly {
    font-size: 12px;
    color: var(--gray-500);
}

/* Income */
.income-list {
    display: flex;
    flex-direction: column;
}

.income-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.income-item:last-child {
    border-bottom: none;
}

.income-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.income-details {
    flex: 1;
}

.income-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}

.income-percent {
    font-size: 12px;
    color: var(--gray-500);
}

.income-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
}


/* Bottom Navigation (Mobile) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 75px;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-shape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    filter: drop-shadow(0 -3px 12px rgba(0, 0, 0, 0.06));
}

.bottom-nav-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 100%;
    padding: 12px 10px 10px 10px;
    box-sizing: border-box;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    min-width: 50px;
    max-height: 50px;
}

.nav-icon-wrap {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-icon-wrap i {
    font-size: 18px;
    transition: all 0.3s ease;
}

.bottom-nav-item span {
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 9px;
}

.bottom-nav-item.active {
    color: #2563eb;
}

.bottom-nav-item.active .nav-icon-wrap i {
    color: #2563eb;
}

/* Spacer for center button */
.bottom-nav-spacer {
    width: 56px;
    flex-shrink: 0;
}

/* Center FAB Button */
.bottom-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -8px;
    z-index: 10;
}

.fab-button {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #2563eb;
}

.fab-icon {
    width: 22px;
    height: 22px;
    color: var(--white);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-icon svg {
    width: 100%;
    height: 100%;
}

.fab-button:active {
    transform: scale(0.95);
}

.fab-button.active {
    background: #ef4444;
}

.fab-button.active .fab-icon {
    transform: rotate(45deg);
}

/* Quick Actions Modal */
.quick-actions-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-actions-overlay.show {
    display: block;
    opacity: 1;
}

.quick-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 24px 24px 0 0;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 1002;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-actions.show {
    transform: translateY(0);
}

.quick-actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.quick-actions-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.quick-actions-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quick-actions-close:hover {
    background: var(--gray-200);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 8px;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.quick-action-item:hover {
    background: var(--gray-50);
}

.quick-action-item:active {
    transform: scale(0.95);
}

.quick-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.quick-action-icon.income {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.quick-action-icon.expense {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.quick-action-icon.transfer {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.quick-action-icon.goal {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.quick-action-icon.bill {
    background: rgba(236, 72, 153, 0.12);
    color: #ec4899;
}

.quick-action-icon.scan {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

.quick-action-item span {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card-chart {
        grid-column: span 2;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .sidebar-footer {
        padding-bottom: 100px;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .search-box {
        display: none;
    }
    
    .user-info {
        display: none;
    }
    
    .user-menu i {
        display: none;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .card-chart {
        grid-column: span 1;
    }
    
    .welcome-section {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .welcome-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .welcome-text {
        text-align: center;
    }
    
    .welcome-name {
        font-size: 24px;
    }
    
    .welcome-subtitle {
        max-width: 100%;
    }
    
    .main-content {
        padding: 16px;
        padding-bottom: 100px;
    }
    
    .topbar {
        padding: 0 16px;
    }
    
    .bottom-nav {
        display: block;
    }
    
    .bottom-nav-content {
        display: flex;
    }
    
    .main-content {
        padding-bottom: 120px;
    }
    
    .networth-breakdown {
        flex-direction: column;
    }
    
    .savings-goal {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .tip-toast {
        left: 16px;
        right: 16px;
        bottom: 110px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: row;
    }
    
    .topbar-btn:not(:first-child) {
        display: none;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card, .card {
    animation: fadeInUp 0.4s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Safe area */
@supports (padding: max(0px)) {
    .main-content {
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
    }
}
