:root {
    /* Default (Obsidian Dark) */
    --bg-color: #050810;
    --sidebar-bg: #0a0f1d;
    --card-bg: rgba(16, 23, 42, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --income: #10b981;
    --expense: #f43f5e;
    --accent: #c084fc;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --shadow-3d: 0 20px 40px rgba(0, 0, 0, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.theme-neon {
    --bg-color: #020617;
    --sidebar-bg: #0f172a;
    --card-bg: rgba(15, 23, 42, 0.8);
    --primary: #f0abfc;
    --primary-glow: rgba(240, 171, 252, 0.5);
    --accent: #fb7185;
    --border-color: rgba(240, 171, 252, 0.2);
}

body.theme-emerald {
    --bg-color: #064e3b;
    --sidebar-bg: #065f46;
    --card-bg: rgba(6, 78, 59, 0.8);
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.5);
    --accent: #34d399;
}

body.theme-arctic {
    --bg-color: #f8fafc;
    --sidebar-bg: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.05);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.2);
    --shadow-3d: 0 20px 40px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
    perspective: 1500px;
    /* Base for 3D */
}

/* App Layout */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version-tag {
    font-size: 0.7rem;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary) !important;
    -webkit-text-fill-color: var(--primary);
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid var(--primary-glow);
    font-weight: 600;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    -webkit-text-fill-color: white;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover,
.nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.nav-item.active {
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.nav-item i {
    font-size: 1.2rem;
}

.sidebar-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.user-info .name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-info .status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 2rem 3rem;
    max-width: calc(100vw - 280px);
    overflow-y: auto;
    height: 100vh;
}

.app-view {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.app-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.view-header {
    margin-bottom: 2rem;
}

.view-header h1 {
    font-size: 2rem;
    font-family: var(--font-display);
    margin-bottom: 1rem;
}

/* Settings Styles */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h4 {
    margin-bottom: 4px;
}

.setting-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.warning {
    color: var(--expense) !important;
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.chart-container-large {
    height: 350px;
}

.full-width-card {
    grid-column: span 3;
}

/* Goals Styles */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.goal-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.goal-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.goal-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.goal-actions {
    display: flex;
    gap: 8px;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    transition: var(--transition);
}

.btn-text:hover {
    color: var(--primary);
}

.btn-delete-goal:hover {
    color: var(--expense);
}

.goal-progress-wrapper {
    cursor: pointer;
}

.goal-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.goal-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.goal-percent {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
}

.goal-progress {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
}

.goal-target-text {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: right;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.notification-wrapper {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 320px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 1000;
    transform-origin: top right;
    animation: scaleIn 0.3s ease-out;
}

.notification-dropdown.show {
    display: block;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.notif-header h3 {
    font-size: 1rem;
}

.btn-clear {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.notif-list {
    max-height: 300px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 10px;
    border-left: 3px solid var(--primary);
    transition: var(--transition);
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.notif-item p {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.notif-item .notif-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--expense);
    border-radius: 50%;
    border: 2px solid var(--bg-color);
    display: none;
}

.notification-badge.active {
    display: block;
}

/* Lock Screen */
.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(40px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lock-screen.active {
    display: flex;
}

.lock-content {
    background: var(--sidebar-bg);
    padding: 40px;
    border-radius: 32px;
    border: 1px solid var(--border-color);
    text-align: center;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    transform: translateZ(100px) rotateX(5deg);
}

.lock-logo {
    margin-bottom: 24px;
}

.lock-logo i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.pin-input-group {
    margin: 32px 0;
}

#pin-input {
    width: 150px;
    font-size: 2rem;
    letter-spacing: 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
}

.error-text {
    color: var(--expense);
    font-size: 0.85rem;
    margin-top: 16px;
    font-weight: 500;
}

/* Vault Auth Styles */
.vaults-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
    margin: 24px 0;
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
}

.vault-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 20px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.vault-card:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.vault-card i {
    font-size: 1.8rem;
    color: var(--primary);
}

.vault-card span {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.auth-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.auth-box {
    animation: fadeInAuth 0.4s ease-out;
}

@keyframes fadeInAuth {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Budget Settings */
.budget-inputs {
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.budget-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.budget-row label {
    margin: 0;
    font-size: 0.8rem;
    flex: 1;
}

.budget-row input {
    width: 100px;
    padding: 8px;
}

.voice-btn {
    position: relative;
}

.voice-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    display: none;
    box-shadow: 0 0 10px var(--primary);
}

.voice-btn.listening .voice-indicator {
    display: block;
    animation: pulsate 1s infinite;
}

@keyframes pulsate {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.search-bar {
    position: relative;
    width: 350px;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-bar input {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 16px 12px 48px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

.theme-toggle i {
    transition: var(--transition);
}

body.light-mode .theme-toggle i.fa-sun {
    display: none;
}

body:not(.light-mode) .theme-toggle i.fa-moon {
    display: none;
}

.btn-icon {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--expense);
    border-radius: 50%;
    border: 2px solid var(--bg-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-main);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px var(--primary-glow);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 26px;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease, border-color 0.4s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backface-visibility: hidden;
    animation: cardEntry 1s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

.card-options {
    position: relative;
    z-index: 10;
}

.btn-icon-small {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-small:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    box-shadow: var(--shadow-3d);
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
}

.dropdown-menu.show {
    display: flex;
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dropdown-menu button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.dropdown-menu button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.hidden-balance {
    filter: blur(8px);
    user-select: none;
    transition: var(--transition);
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateZ(-150px) translateY(30px) rotateX(5deg);
    }

    to {
        opacity: 1;
        transform: translateZ(0) translateY(0) rotateX(0);
    }
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-8px) translateZ(20px) rotateX(2deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.card:hover::before {
    transform: translateX(100%);
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.15) 0%, transparent 80%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    transform: translateZ(1px);
}

.card:hover::after {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.card-body h2 {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: var(--font-display);
    margin-bottom: 8px;
}

.trend {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.up {
    color: var(--income);
}

.trend.down {
    color: var(--expense);
}

/* Specific Card Styles */
.card-summary.balance {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 23, 42, 0.6));
    border-color: rgba(99, 102, 241, 0.3);
}

.icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.income .icon-circle {
    background: rgba(16, 185, 129, 0.1);
    color: var(--income);
}

.expenses .icon-circle {
    background: rgba(244, 63, 94, 0.1);
    color: var(--expense);
}

.card-analytics {
    grid-column: span 2;
}

.chart-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 10px;
}

.chart-tabs button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.chart-tabs button.active {
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chart-container {
    height: 300px;
}

.card-transactions {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
}

.card-categories {
    grid-column: span 1;
}

.chart-container-alt {
    height: 220px;
    margin-bottom: 20px;
}

.category-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.card-insights {
    grid-column: span 1;
}

.insight-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 3px solid var(--primary);
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.transaction-list::-webkit-scrollbar {
    width: 4px;
}

.transaction-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.transaction-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-color);
    transform: translateZ(20px);
}

.t-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
    margin-left: 10px;
}

.transaction-item:hover .t-actions {
    opacity: 1;
}

.btn-small {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition);
}

.btn-edit {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
}

.btn-delete {
    background: rgba(244, 63, 94, 0.2);
    color: var(--expense);
}

.btn-small:hover {
    transform: scale(1.1);
}

.t-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.t-details {
    flex-grow: 1;
}

.t-details .t-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
}

.t-details .t-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.t-amount {
    font-weight: 700;
    font-size: 0.95rem;
}

.t-amount.income {
    color: var(--income);
}

.t-amount.expense {
    color: var(--text-primary);
}

.recurring-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: rgba(192, 132, 252, 0.1);
    color: var(--accent);
    border-radius: 6px;
    margin-left: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--sidebar-bg);
    width: 100%;
    max-width: 450px;
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

input,
select {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
}

.chart-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.chart-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out forwards;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:nth-child(5) {
    animation-delay: 0.5s;
}

.modal-content.large {
    max-width: 800px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 24px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.import-preview {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.import-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.import-table th,
.import-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.import-table th {
    color: var(--text-secondary);
    font-weight: 600;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Budget Tracker UI */
.budget-progress-item {
    margin-bottom: 20px;
}

.budget-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.budget-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.budget-bar .fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.budget-progress-item.warning .fill {
    background: #f59e0b;
}

.budget-progress-item.danger .fill {
    background: var(--expense);
}

.budget-progress-item.danger .budget-info {
    color: var(--expense);
}

.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-secondary);
}

.report-canvas {
    background: white;
    color: #1a1a1a;
    padding: 40px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
}

.report-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #6366f1;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.report-title h1 {
    color: #6366f1;
    font-size: 2rem;
    margin-bottom: 5px;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.report-stat-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.report-stat-card h4 {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.report-stat-card p {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.report-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.report-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 5px;
}

.report-table-mini {
    width: 100%;
    border-collapse: collapse;
}

.report-table-mini td {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.report-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* AI Status Pill */
.ai-status-pill {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 15px;
}

.ai-status-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.status-orb {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    position: relative;
}

.status-orb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    animation: orbPulse 2s infinite;
}

@keyframes orbPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

#ai-status-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.ai-status-pill i {
    font-size: 0.7rem;
    opacity: 0.4;
    transition: transform 0.3s ease;
}

.ai-status-pill:hover i {
    transform: translateX(3px);
    opacity: 0.8;
}

.ai-status-pill.listening {
    border-color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
}

.ai-status-pill.listening .status-orb {
    background: #f43f5e;
    box-shadow: 0 0 15px #f43f5e;
}

@media (max-width: 1200px) {
    .ai-status-pill {
        display: none;
    }
}

/* Financial Health Meter */
.card-health {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.health-gauge-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 20px auto;
    filter: drop-shadow(0 0 15px var(--primary-glow));
}

.health-gauge svg {
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.gauge-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s ease;
}

.gauge-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
}

.gauge-content span {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--text-primary);
}

.gauge-content small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Insight Enhancements */
.insight-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 3px solid var(--primary);
    font-size: 0.9rem;
    animation: slideIn 0.5s ease-out backwards;
}

.insight-item.warning {
    border-left-color: #f59e0b;
}

.insight-item.danger {
    border-left-color: var(--expense);
}

.insight-item.success {
    border-left-color: var(--income);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.voice-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sidebar-bg);
    border: 1px solid var(--primary);
    padding: 12px 24px;
    border-radius: 30px;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--primary-glow);
    animation: toastPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: opacity 0.5s ease;
}

@keyframes toastPop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Custom Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

input:checked+.slider {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* App Container Aura */
.app-container::before {
    content: '';
    position: fixed;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    filter: blur(80px);
    transition: top 0.2s ease-out, left 0.2s ease-out;
}

/* Superior Glass Cards */
.card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5), 0 0 20px var(--primary-glow);
}

/* Magnetic Glow Border */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: radial-gradient(circle 150px at var(--mouse-x-card, 50%) var(--mouse-y-card, 50%),
            rgba(255, 255, 255, 0.3),
            transparent 80%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}

.card:hover::before {
    opacity: 1;
}

/* Floating Navigation */
.sidebar {
    background: rgba(10, 15, 29, 0.6);
    backdrop-filter: blur(30px);
    border-radius: 0 40px 40px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item {
    transition: 0.3s;
}

.nav-item:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
    padding-left: 20px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .card-analytics {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
    }

    .logo span,
    .nav-item span,
    .user-info {
        display: none;
    }

    .main-content {
        margin-left: 80px;
        max-width: calc(100vw - 80px);
        padding: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card-analytics {
        grid-column: span 1;
    }
}