:root {
    /* Colors */
    --bg-main: #060A08;
    /* Very dark green-black */
    --bg-panel: #0A120E;
    /* Dark green for panels */
    --bg-card: #111A15;
    /* Card background */
    --bg-card-hover: #16241D;

    --primary-neon: #00E57A;
    /* Vibrant neon green */
    --primary-glow: rgba(0, 229, 122, 0.2);
    --secondary-green: #004D29;
    --dark-green: #0B1F13;

    --text-main: #FFFFFF;
    --text-muted: #8FA396;

    --border-color: rgba(255, 255, 255, 0.05);

    /* Shadows */
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* Layout */
    --sidebar-width: 280px;
    --ai-panel-width: 380px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ================== LEFT SIDEBAR ================== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 48px;
}

.logo i {
    color: var(--primary-neon);
    font-size: 28px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.menu-item i {
    font-size: 22px;
}

.menu-item:hover {
    color: var(--text-main);
    background-color: var(--bg-card);
}

.menu-item.active {
    color: var(--primary-neon);
    background-color: var(--dark-green);
    position: relative;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 4px;
    background-color: var(--primary-neon);
    border-radius: 0 4px 4px 0;
}

/* Sidebar Bottom */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.premium-card {
    background: linear-gradient(145deg, var(--bg-card), var(--dark-green));
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.premium-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: var(--primary-neon);
    filter: blur(80px);
    opacity: 0.2;
}

.premium-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 229, 122, 0.1);
    color: var(--primary-neon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.premium-card h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.premium-card p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upgrade-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--text-main);
    color: var(--bg-main);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.upgrade-btn:hover {
    transform: scale(1.02);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.user-profile:hover {
    border-color: var(--border-color);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.account-type {
    font-size: 12px;
    color: var(--text-muted);
}

/* ================== MAIN DASHBOARD ================== */
.dashboard {
    flex: 1;
    padding: 40px 48px;
    overflow-y: auto;
    background: radial-gradient(circle at center top, #0A1A12 0%, var(--bg-main) 100%);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
}

.header-titles h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header-titles p {
    color: var(--text-muted);
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 16px;
}

.icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background-color: var(--bg-card-hover);
    transform: translateY(-2px);
}

.notification-dot {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 8px;
    height: 8px;
    background-color: var(--primary-neon);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-neon);
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 900px;
}

/* Total Balance Card */
.balance-card {
    background: linear-gradient(135deg, rgba(17, 26, 21, 0.8) 0%, rgba(11, 31, 19, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 229, 122, 0.15);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at top right, rgba(0, 229, 122, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.balance-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.balance-header h2 {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 500;
}

.trend.positive {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: rgba(0, 229, 122, 0.15);
    color: var(--primary-neon);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.balance-amount {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -1px;
}

.balance-actions {
    display: flex;
    gap: 16px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-neon);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 229, 122, 0.3);
}

.btn-primary:hover {
    background-color: #00FF88;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 122, 0.4);
}

.btn-secondary {
    background-color: #1A261F;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #24362B;
    border-color: rgba(255, 255, 255, 0.1);
}

.btn.is-loading,
.auth-submit.is-loading {
    cursor: wait;
    opacity: 0.85;
    pointer-events: none;
}

/* Spending Card */
.spending-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.spending-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 32px;
}

.spending-content {
    display: flex;
    align-items: center;
    gap: 64px;
}

.chart-container {
    position: relative;
    width: 200px;
    height: 200px;
}

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

.chart-center span {
    font-size: 14px;
    color: var(--text-muted);
}

.chart-center h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 4px;
}

.spending-legend {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.highlight-1 {
    background-color: var(--primary-neon);
    box-shadow: 0 0 10px var(--primary-neon);
}

.highlight-2 {
    background-color: #008F4C;
}

.highlight-3 {
    background-color: #244231;
}

.legend-info {
    display: flex;
    justify-content: space-between;
    flex: 1;
    align-items: center;
}

.legend-label {
    font-size: 16px;
    color: var(--text-main);
}

.legend-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
}

.overview-transactions-card {
    margin-top: 24px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
}

.overview-transactions-card .section-header {
    margin-bottom: 20px;
}

.overview-transactions-card h2 {
    font-size: 20px;
    font-weight: 600;
}

.overview-transactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overview-transactions-list .transaction-item {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
}

.empty-state {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ================== RIGHT AI PANEL ================== */
.ai-panel {
    width: var(--ai-panel-width);
    background-color: var(--bg-panel);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
}

.ai-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0, 229, 122, 0.05), transparent);
}

.ai-title-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ai-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--dark-green), #000);
    border: 1px solid rgba(0, 229, 122, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-neon);
    position: relative;
}

.status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: var(--primary-neon);
    border-radius: 50%;
    border: 2px solid var(--bg-panel);
    box-shadow: 0 0 8px var(--primary-neon);
}

.ai-info h2 {
    font-size: 18px;
    font-weight: 600;
}

.ai-subtitle {
    font-size: 13px;
    color: var(--primary-neon);
}

.chat-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.chat-area::-webkit-scrollbar {
    width: 6px;
}

.chat-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.ai-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.bubble {
    padding: 16px 20px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ai-message .bubble {
    background-color: #111E16;
    /* Dark bubble */
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0, 229, 122, 0.1);
}

.user-message .bubble {
    background-color: #004D29;
    /* Greenish bubble */
    color: var(--text-main);
    border-bottom-right-radius: 4px;
}

.time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    padding: 0 4px;
}

.ai-message .time {
    align-self: flex-start;
}

.user-message .time {
    align-self: flex-end;
}

.chat-input-area {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-panel);
}

.input-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 6px 6px 6px 20px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: rgba(0, 229, 122, 0.4);
    box-shadow: 0 0 15px rgba(0, 229, 122, 0.1);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 15px;
    outline: none;
}

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

.mic-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}

.mic-btn:hover {
    color: var(--text-main);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-neon);
    color: #000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 229, 122, 0.3);
}

.send-btn:hover {
    background-color: #00FF88;
    transform: scale(1.05);
}

@media (max-width: 1200px) {
    .spending-content {
        flex-direction: column;
        gap: 32px;
    }

}

/* Transaction View Styles */
.transactions-content {
    max-width: 1000px;
}

.filter-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background-color: rgba(0, 229, 122, 0.15);
    color: var(--primary-neon);
}

.transactions-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.transaction-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.group-date {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    background-color: var(--bg-card-hover);
    transform: translateX(4px);
    border-color: rgba(0, 229, 122, 0.2);
}

.tx-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
}

.tx-icon.expense {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.tx-icon.income {
    background-color: rgba(0, 229, 122, 0.1);
    color: var(--primary-neon);
}

.tx-icon.transfer {
    background-color: rgba(143, 163, 150, 0.1);
    color: var(--text-muted);
}

.tx-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tx-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.tx-info span {
    font-size: 13px;
    color: var(--text-muted);
}

.tx-amount {
    font-size: 18px;
    font-weight: 700;
    text-align: right;
}

.tx-amount.positive {
    color: var(--primary-neon);
}

.tx-amount.negative {
    color: var(--text-main);
}

.tx-amount.neutral {
    color: var(--text-muted);
}

/* Goals View Styles */
.goals-content {
    max-width: 1000px;
}

.goal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
}

.goal-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.highlight-goal {
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(17, 26, 21, 0.9) 0%, rgba(11, 31, 19, 0.8) 100%);
    border-color: rgba(0, 229, 122, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.goal-icon-title {
    display: flex;
    align-items: center;
}

.goal-icon-title h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.goal-icon-title h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

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

.goal-progress-section {
    margin-bottom: 24px;
}

.goal-amounts {
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.goal-amounts .current-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
}

.goal-amounts .target-amount {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 500;
}

.goal-amounts.small .current-amount {
    font-size: 24px;
}

.goal-amounts.small .target-amount {
    font-size: 14px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-container.large {
    height: 12px;
    border-radius: 6px;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-neon);
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 229, 122, 0.3);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.positive-trend {
    color: var(--primary-neon);
    display: flex;
    align-items: center;
    gap: 4px;
}

.goal-suggestion {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: rgba(0, 229, 122, 0.05);
    border: 1px solid rgba(0, 229, 122, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
}

.goal-suggestion p {
    flex: 1;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.standard-goal {
    padding: 24px;
}

.add-goal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px dashed var(--border-color);
    background-color: transparent;
    cursor: pointer;
    min-height: 200px;
}

.add-goal-card:hover {
    background-color: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.add-goal-card i {
    font-size: 32px;
    color: var(--text-muted);
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.add-goal-card:hover i {
    color: var(--text-main);
}

.add-goal-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.add-goal-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Investments View Styles */
.investments-content {
    max-width: 1000px;
}

.portfolio-summary-card {
    background: linear-gradient(135deg, rgba(17, 26, 21, 0.9) 0%, rgba(11, 31, 19, 0.8) 100%);
    border: 1px solid rgba(0, 229, 122, 0.2);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(0, 229, 122, 0.05);
    margin-bottom: 24px;
}

.portfolio-left h2 {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.portfolio-returns {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trend.positive.large {
    font-size: 16px;
    padding: 6px 14px;
    border-radius: 20px;
}

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

.portfolio-right {
    min-width: 200px;
}

.asset-allocation {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.allocation-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alloc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.alloc-label {
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
}

.insight-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(90deg, #004D29 0%, #0A120E 100%);
    border: 1px solid var(--primary-neon);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 40px;
    box-shadow: 0 0 20px rgba(0, 229, 122, 0.1);
}

.insight-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 229, 122, 0.2);
    color: var(--primary-neon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.insight-text {
    flex: 1;
}

.insight-text h4 {
    font-size: 15px;
    color: var(--primary-neon);
    margin-bottom: 4px;
}

.insight-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

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

.section-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.asset-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.asset-card:hover {
    background-color: var(--bg-card-hover);
    border-color: rgba(0, 229, 122, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.asset-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.asset-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-main);
}

.asset-title {
    flex: 1;
}

.asset-title h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.asset-title span {
    font-size: 12px;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.asset-chart-mini {
    width: 60px;
    height: 30px;
}

.asset-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.asset-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.asset-value .value {
    font-size: 20px;
    font-weight: 700;
}

.asset-value .shares {
    font-size: 13px;
    color: var(--text-muted);
}

.asset-change {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
}

.asset-change.positive {
    color: var(--primary-neon);
}

.asset-change.negative {
    color: #FF4C4C;
    /* Soft red for negative */
}

/* SPA View Classes */
.view {
    display: none !important;
}

main.view.active {
    display: block !important;
}

aside.view.active {
    display: flex !important;
}

/* ================== MODALS ================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 229, 122, 0.1);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: -16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.amount-input-wrapper {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.amount-input-wrapper:focus-within {
    border-color: var(--primary-neon);
    box-shadow: 0 0 0 2px rgba(0, 229, 122, 0.1);
}

.currency-symbol {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-neon);
    margin-right: 8px;
}

.amount-input-wrapper input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 28px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    width: 100%;
    outline: none;
}

.amount-input-wrapper input::-webkit-outer-spin-button,
.amount-input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    appearance: none;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-wrapper select:focus {
    border-color: var(--primary-neon);
}

/* Style the native select options slightly if possible */
.select-wrapper select option {
    background-color: var(--bg-panel);
    color: var(--text-main);
}

.select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.quick-amounts {
    display: flex;
    gap: 12px;
}

.quick-btn {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.quick-btn.active {
    background-color: rgba(0, 229, 122, 0.1);
    border-color: var(--primary-neon);
    color: var(--primary-neon);
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: #03100d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    z-index: 9999;
    overflow: hidden;
}

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

.auth-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 122, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 122, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
    animation: authGridMove 18s linear infinite;
}

.auth-shape {
    position: absolute;
    border-radius: 999px;
    filter: blur(12px);
    opacity: 0.45;
    animation: authFloat 8s ease-in-out infinite;
}

.auth-shape-one {
    width: 220px;
    height: 220px;
    left: 14%;
    top: 18%;
    background: rgba(0, 229, 122, 0.12);
}

.auth-shape-two {
    width: 280px;
    height: 280px;
    right: 12%;
    bottom: 14%;
    background: rgba(0, 143, 76, 0.16);
    animation-delay: -3s;
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    min-height: 560px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background: rgba(6, 14, 12, 0.82);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(24px);
    overflow: hidden;
}

.auth-visual {
    position: relative;
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 25% 30%, rgba(0, 229, 122, 0.14), transparent 32%),
        linear-gradient(140deg, rgba(0, 229, 122, 0.08), transparent 48%);
}

.auth-logo-mark {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(0, 229, 122, 0.12);
    color: #00E57A;
    font-size: 28px;
    margin-bottom: 22px;
    box-shadow: 0 0 28px rgba(0, 229, 122, 0.16);
}

.auth-kicker {
    color: #00E57A;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 14px;
}

.auth-visual h1 {
    max-width: 520px;
    font-size: 46px;
    line-height: 1.05;
    letter-spacing: 0;
    margin-bottom: 18px;
}

.auth-visual p {
    max-width: 460px;
    color: #9CB7A7;
    line-height: 1.7;
    font-size: 15px;
}

.auth-preview-card {
    width: min(360px, 100%);
    margin-top: 42px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(8, 24, 17, 0.88);
    border: 1px solid rgba(0, 229, 122, 0.15);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.preview-header,
.preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #8FA396;
    font-size: 13px;
}

.preview-header strong,
.preview-row strong {
    color: #FFFFFF;
    font-size: 15px;
}

.preview-chart {
    height: 104px;
    display: flex;
    align-items: end;
    gap: 10px;
    margin: 22px 0;
}

.preview-chart span {
    flex: 1;
    min-width: 20px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #00E57A, #006C3A);
    box-shadow: 0 0 18px rgba(0, 229, 122, 0.18);
    animation: chartPulse 2.8s ease-in-out infinite;
}

.preview-chart span:nth-child(2n) {
    animation-delay: -1.2s;
}

.auth-box {
    padding: 54px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(9, 18, 15, 0.9);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #00E57A;
    margin-bottom: 8px;
}

.auth-logo i {
    font-size: 28px;
}

.auth-subtitle {
    color: #8FA396;
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 26px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 5px;
}

.auth-tab {
    flex: 1;
    padding: 11px;
    border: none;
    background: transparent;
    color: #8FA396;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.auth-tab.active {
    background: rgba(0, 229, 122, 0.14);
    color: #00E57A;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #8FA396;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.auth-field input {
    width: 100%;
    padding: 14px 15px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
}

.auth-field input:focus {
    border-color: rgba(0, 229, 122, 0.55);
    background: rgba(0, 229, 122, 0.055);
    box-shadow: 0 0 0 4px rgba(0, 229, 122, 0.06);
}

.auth-submit {
    width: 100%;
    margin-top: 8px;
    min-height: 48px;
    border-radius: 14px;
    font-size: 15px;
}

.auth-error {
    display: none;
    min-height: 18px;
    color: #FF6B6B;
    font-size: 13px;
    margin-top: 12px;
}

@keyframes authGridMove {
    from { background-position: 0 0; }
    to { background-position: 56px 56px; }
}

@keyframes authFloat {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(18px, -18px, 0); }
}

@keyframes chartPulse {
    0%, 100% { opacity: 0.72; transform: scaleY(0.94); }
    50% { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 860px) {
    .auth-overlay {
        padding: 18px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-visual {
        padding: 34px 28px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .auth-visual h1 {
        font-size: 34px;
    }

    .auth-preview-card {
        display: none;
    }

    .auth-box {
        padding: 32px 28px;
    }
}
