/* ===== CSS Variables & Design Tokens ===== */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 50, 0.8);
    --bg-card-hover: rgba(40, 40, 65, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --accent-purple: #8b5cf6;
    --accent-purple-light: #a78bfa;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --accent-pink: #ec4899;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #16213e 50%, var(--bg-primary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top left, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ===== Layout ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
    max-width: 1400px;
}

/* ===== Sidebar ===== */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo svg {
    stroke: var(--accent-purple);
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
    margin: 0.25rem 0;
}

.nav-item:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, transparent 100%);
    color: var(--accent-purple-light);
    border-left-color: var(--accent-purple);
}

.nav-item svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.sync-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* ===== Content Sections ===== */
.content-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.content-section.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    z-index: -1;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.gradient-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.gradient-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(239, 68, 68, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.gradient-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.gradient-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 0.375rem;
}

/* ===== Wishlists Grid ===== */
.wishlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.wishlist-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.wishlist-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.wishlist-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wishlist-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

.wishlist-header-actions {
    display: flex;
    gap: 0.5rem;
}

.wishlist-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.wishlist-items {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.wishlist-item {
    display: flex;
    gap: 1rem;
    padding: 0.875rem;
    background: var(--glass-bg);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.wishlist-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border);
}

.wishlist-item:last-child {
    margin-bottom: 0;
}

.wishlist-item-image-link {
    display: block;
    flex-shrink: 0;
}

.wishlist-item-image {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    object-fit: cover;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.wishlist-item-info {
    flex: 1;
    min-width: 0;
}

.wishlist-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wishlist-item-price {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 1.125rem;
}

.wishlist-item-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--accent-blue);
    text-decoration: none;
    margin-top: 0.5rem;
}

.wishlist-item-link:hover {
    text-decoration: underline;
}

.wishlist-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wishlist-footer {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
}

.add-item-btn {
    width: 100%;
    justify-content: center;
}

/* ===== Items List ===== */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--glass-bg);
    border-radius: 0.75rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.list-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border);
}

.item-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    flex-shrink: 0;
}

.item-icon.expense {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.item-icon.income {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.item-amount {
    font-weight: 700;
    font-size: 1.125rem;
}

.item-amount.expense {
    color: var(--accent-red);
}

.item-amount.income {
    color: var(--accent-green);
}

.item-actions {
    display: flex;
    gap: 0.375rem;
}

/* ===== Savings Grid ===== */
.savings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.savings-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: var(--transition);
}

.savings-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-4px);
}

.savings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.savings-name {
    font-size: 1.125rem;
    font-weight: 600;
}

.savings-target {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.savings-progress {
    margin: 1.25rem 0;
}

.progress-bar {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-blue) 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.progress-amount {
    font-weight: 600;
    color: var(--accent-green);
}

.progress-percent {
    color: var(--text-muted);
}

.savings-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.savings-actions .btn {
    flex: 1;
    justify-content: center;
}

/* ===== Goal Cards ===== */
.goal-card {
    border-color: rgba(139, 92, 246, 0.2);
}

.goal-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.goal-complete {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, var(--bg-card) 100%);
}

.complete-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, var(--accent-green) 0%, #34d399 100%);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 1rem;
    text-transform: uppercase;
    margin-left: 0.5rem;
    animation: celebrate 0.5s ease;
}

@keyframes celebrate {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.progress-complete {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}


/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    cursor: pointer;
}

/* ===== Store Badges ===== */
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}

.store-amazon {
    background: rgba(255, 153, 0, 0.2);
    color: #ff9900;
}

.store-ebay {
    background: rgba(0, 100, 210, 0.2);
    color: #0064d2;
}

.store-walmart {
    background: rgba(0, 113, 206, 0.2);
    color: #0071ce;
}

.store-other {
    background: var(--glass-bg);
    color: var(--text-secondary);
}

/* ===== Empty States ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.875rem;
}

/* ===== Accounts Grid ===== */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.account-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.1);
}

.account-type-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Account Type Variations */
.account-card.type-checking .account-type-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.account-card.type-savings .account-type-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.account-card.type-credit .account-type-icon,
.account-card.type-loan .account-type-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.account-name {
    font-size: 1.125rem;
    font-weight: 600;
}

.account-institution {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.account-balance {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: auto;
}

.account-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

/* ===== Expense Summary & Paid Feature ===== */
.expense-summary {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.expense-summary-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.expense-summary-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.expense-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.expense-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.expense-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.expense-stat-paid .expense-stat-value {
    color: var(--accent-green);
}

.expense-stat-unpaid .expense-stat-value {
    color: var(--accent-orange);
}

/* Paid Badge */
.paid-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, var(--accent-green) 0%, #34d399 100%);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 1rem;
    text-transform: uppercase;
    margin-left: 0.5rem;
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Paid Expense Item Styling */
.list-item.expense-paid {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.list-item.expense-paid:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.item-icon.expense.paid {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.item-amount.expense.paid {
    color: var(--accent-green);
    text-decoration: line-through;
    opacity: 0.7;
}

/* Mark as Paid Button */
.btn-paid {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-paid:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(16, 185, 129, 0.2) 100%);
    transform: scale(1.05);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, #34d399 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, var(--accent-green) 100%);
    transform: scale(1.05);
}

/* Stat subtext for dashboard */
.stat-subtext {
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.7;
    margin-left: 0.25rem;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Dashboard Wishlist Items ===== */
.dashboard-wishlist-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    background: var(--glass-bg);
    border-radius: 0.625rem;
    margin-bottom: 0.625rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.dashboard-wishlist-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border);
}

.dashboard-wishlist-item:last-child {
    margin-bottom: 0;
}

.dashboard-item-image {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    object-fit: cover;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.dashboard-item-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: rgba(139, 92, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    flex-shrink: 0;
}

.dashboard-item-info {
    flex: 1;
    min-width: 0;
}

.dashboard-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dashboard-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.dashboard-item-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-green);
    flex-shrink: 0;
}

/* ===== Responsive ===== */

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
}

.mobile-overlay.active {
    display: block;
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
        padding-top: 4.5rem;
        /* Space for mobile menu button */
    }
}

/* Mobile breakpoint */
@media (max-width: 640px) {
    .main-content {
        padding: 1rem;
        padding-top: 4rem;
    }

    /* Stats Grid - 2 columns on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Section Headers */
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .section-header h1 {
        font-size: 1.5rem;
    }

    .section-header .btn {
        width: 100%;
        justify-content: center;
    }

    /* Dashboard Grid */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    /* Wishlists Grid */
    .wishlists-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .wishlist-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .wishlist-item-image {
        width: 100%;
        height: 150px;
    }

    .wishlist-item-actions {
        flex-direction: row;
        width: 100%;
        justify-content: flex-end;
    }

    /* Dashboard Wishlist Items */
    .dashboard-wishlist-item {
        gap: 0.625rem;
        padding: 0.625rem;
    }

    .dashboard-item-image,
    .dashboard-item-placeholder {
        width: 40px;
        height: 40px;
    }

    .dashboard-item-name {
        font-size: 0.8125rem;
    }

    .dashboard-item-price {
        font-size: 0.875rem;
    }

    /* List Items (Expenses/Income) */
    .list-item {
        flex-wrap: wrap;
        gap: 0.625rem;
        padding: 0.875rem;
    }

    .item-icon {
        width: 38px;
        height: 38px;
    }

    .item-info {
        flex: 1 1 calc(100% - 100px);
        min-width: 150px;
    }

    .item-name {
        font-size: 0.875rem;
    }

    .item-amount {
        font-size: 1rem;
    }

    .item-actions {
        flex-direction: row;
    }

    /* Savings/Goals Grid */
    .savings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .savings-card {
        padding: 1.25rem;
    }

    .savings-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .savings-actions {
        flex-direction: column;
    }

    .savings-actions .btn {
        width: 100%;
    }

    /* Modal */
    .modal {
        max-width: 100%;
        margin: 0.5rem;
        border-radius: 0.75rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Cards */
    .card {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .card h3 {
        font-size: 1rem;
    }

    /* Buttons */
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .btn-sm {
        padding: 0.5rem 0.625rem;
    }

    /* Form Elements */
    .form-input,
    .form-select {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.8125rem;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: row;
        text-align: left;
    }

    .mobile-menu-btn {
        top: 0.5rem;
        left: 0.5rem;
    }

    .main-content {
        padding: 0.75rem;
        padding-top: 3.5rem;
    }
}