:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #65B884;
    /* Light green accent */
    --accent-bg: rgba(163, 255, 174, 0.1);
    --danger-color: #ff6b6b;
    --danger-bg: rgba(255, 107, 107, 0.1);
    --warning-color: #ffd93d;
    --warning-bg: rgba(255, 217, 61, 0.1);
    --border-color: #333;
    --font-family: 'Inter', sans-serif;

    /* New Variables */
    --bg-sidebar: #181818;
    --bg-surface: #2a2a2a;
    --bg-surface-hover: #333333;
    --bg-balance-gradient: linear-gradient(145deg, #252525, #1e1e1e);

    /* Input & Button Backgrounds */
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-bg-hover: rgba(255, 255, 255, 0.08);
    --btn-secondary-bg: rgba(255, 255, 255, 0.08);
    --btn-secondary-hover: rgba(255, 255, 255, 0.15);
}

.light-mode {
    --bg-dark: #cbd5e1;
    --bg-card: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --border-color: #94a3b8;

    /* New Variables Light Mode */
    --bg-sidebar: #e2e8f0;
    --bg-surface: #cbd5e1;
    --bg-surface-hover: #94a3b8;
    --bg-balance-gradient: linear-gradient(145deg, #e2e8f0, #cbd5e1);

    /* Input & Button Backgrounds Light Mode */
    --input-bg: #f1f5f9;
    --input-bg-hover: #e2e8f0;
    --btn-secondary-bg: #cbd5e1;
    --btn-secondary-hover: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    font-family: var(--font-family);
    background-color: #1a1a1a; /* Dark background for standalone demo */
    background-image: url('https://cdnb.artstation.com/p/assets/images/images/080/795/557/large/synced3d-1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Transparent for FiveM */
    color: var(--text-primary);
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Site Navigation */
.site-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    pointer-events: none; /* Allow clicking through empty space */
    background: rgba(0, 0, 0, 0.703);
    backdrop-filter: blur(10px);
}

.site-nav-logo {
    font-size: 24px;
    font-weight: 800;
    pointer-events: auto;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    text-decoration: none; /* Removed underline */
    cursor: pointer;
}

.site-nav-logo .omes {
    color: #fff;
}

.site-nav-logo .dev {
    color: var(--accent-color);
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
}

.site-nav-link {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-color);
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    box-shadow: 0 4px 15px rgba(101, 184, 132, 0.3);
}

.site-nav-link:hover {
    color: #000;
    background: #7bd09a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(101, 184, 132, 0.4);
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: 0.3s;
    font-size: 16px;
}

.social-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.container {
    width: 1350px;
    height: 850px;
    background-color: var(--bg-dark);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    transform-origin: center center;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background-color: var(--bg-dark);
    flex-shrink: 0;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 100px;
    height: 50px;
    background-color: transparent;
    color: var(--bg-dark);
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
}


.top-nav {
    display: flex;
    gap: 10px;
    background-color: var(--bg-surface);
    padding: 5px;
    border-radius: 30px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-item i {
    font-size: 15px;
}

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

.nav-item.active {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.user-profile-pill {
    display: flex;
    align-items: center;
    background-color: var(--bg-surface);
    padding: 5px 10px;
    border-radius: 30px;
    gap: 10px;
}

.avatars {
    display: flex;
}

.avatars img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--bg-surface);
    margin-left: -10px;
}

.avatars img:first-child {
    margin-left: 0;
}

.notification-badge {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 50%;
}

.action-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.action-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.icon-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.icon-btn-small:hover {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.user-avatar-small img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 8px 24px 20px 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Welcome Header (Renamed from Header) */
.welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.header-left h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 4px;
}

.header-left p {
    color: var(--text-secondary);
    font-size: 15px;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.theme-toggle {
    background-color: var(--bg-surface);
    padding: 5px;
    border-radius: 20px;
    display: flex;
    gap: 5px;
}

.theme-toggle i {
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
}

.theme-toggle i.active {
    background-color: var(--text-primary);
    color: var(--bg-dark);
}

.icon-btn {
    background-color: var(--bg-surface);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto 1fr;
    gap: 14px;
    flex: 1;
    min-height: 0;
}

.bottom-left-column {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    /* Prevent overflow issues */
}

.cards-widget {
    position: relative;
    overflow: hidden;
    grid-column: span 1;
}

.card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
}

/* Combined Balance & Wallets Card */
.balance-wallets-card {
    grid-column: span 1;
    background: var(--bg-balance-gradient);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.currency-selector {
    background-color: var(--bg-surface-hover);
    padding: 5px 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.currency-selector img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.balance-amount {
    font-size: 40px;
    font-weight: 600;
    margin: 6px 0;
}

.balance-amount .cents {
    font-size: 22px;
    color: var(--text-secondary);
}

.balance-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    margin-bottom: 10px;
}

.balance-trend .badge {
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: 600;
    margin-right: 0;
    font-size: 12px;
}

.balance-trend.positive .badge {
    background-color: var(--accent-bg);
    color: var(--accent-color);
}

.balance-trend.negative .badge {
    background-color: var(--danger-bg);
    color: var(--danger-color);
}

.balance-trend .text-muted {
    color: var(--text-secondary);
}

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

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 10px;
    border-radius: 24px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-family: var(--font-family);
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #7dd3e8;
    background-image: none;
    color: #000;
}

.btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--text-secondary);
    border: none;
}

.btn-secondary:hover {
    background-color: var(--btn-secondary-hover);
    color: var(--text-primary);
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
    margin-top: 12px;
    flex-shrink: 0;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Center align items */
    background: transparent;
    padding: 10px 0;
    /* Added padding */
    border: none;
    min-width: 0;
    overflow: visible;
    /* Allow overlap if needed, but handled by text-overflow */
    text-align: center;
    /* Center text */
}

.stat-card .card-header {
    margin-bottom: 4px;
    /* Increased margin */
    justify-content: center;
    /* Center header content */
    padding: 0;
    gap: 0;
}

.stat-card .card-header span {
    font-size: 13px;
    /* Increased from 11px */
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

.stat-card .icon-box {
    display: none;
}

.stat-value {
    font-size: 22px;
    /* Increased from 16px */
    font-weight: 700;
    margin-bottom: 4px;
    /* Increased margin */
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-trend {
    font-size: 10px;
    /* Smaller trend text */
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center trend items */
    gap: 3px;
    line-height: 1;
    white-space: nowrap;
    /* Prevent wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-trend .badge {
    padding: 0;
    background: none !important;
    font-weight: 700;
    margin-right: 0;
    font-size: 10px;
}

.stat-trend.positive .badge {
    color: var(--accent-color);
}

.stat-trend.negative .badge {
    color: var(--danger-color);
}

/* Wallets Section within Combined Card */
.wallets-section {
    margin-top: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wallets-header {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.subaccounts-count-label {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.btn-small-new {
    background-color: #65B884;
    background-image: none;
    color: #000;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-family);
}

.btn-small-new:hover {
    opacity: 0.9;
}

.btn-small-view {
    background-color: var(--bg-surface-hover);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-family);
}

.btn-small-view:hover {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.wallets-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 3px;
    flex: 1;
    min-height: 0;
}

.wallet-item {
    background-color: var(--bg-surface);
    border-radius: 16px;
    padding: 12px;
    min-width: 130px;
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Align content to top */
    transition: all 0.2s ease;
    border: 1px solid transparent;
    /* Prepare for border */
}

.wallet-item.active-context {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.wallet-icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 18px;
}

.wallet-icon img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.wallet-currency {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
}

.wallet-amount {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
}

.wallet-limit {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.wallet-status {
    font-size: 11px;
    font-weight: 600;
}

.wallet-status.active {
    color: var(--accent-color);
}

.wallet-status.inactive {
    color: var(--danger-color);
}

.wallet-options-btn {
    /* Positioned inside wallet-options-wrapper now */
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    transition: all 0.2s ease;
    opacity: 1;
    /* Always visible */
}

.wallet-options-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Sub-account Dropdown */
.wallet-options-dropdown {
    position: absolute;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: none;
    flex-direction: column;
    min-width: 140px;
    overflow: hidden;
    padding: 4px;
}

.wallet-options-dropdown.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

#subaccount-context-menu {
    position: absolute;
    z-index: 900;
}

.wallet-option-item {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
}

.wallet-option-item:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.wallet-option-item i {
    width: 16px;
    text-align: center;
}

.wallet-option-item.danger {
    color: var(--danger-color);
}

.wallet-option-item.danger:hover {
    background-color: var(--danger-bg);
}

/* Chart Card */
.chart-card {
    grid-column: span 1;
}

.sub-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* Income chart period dropdown */
.chart-period-select {
    appearance: none;
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border: 1px solid transparent;
    padding: 4px 26px 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-family: var(--font-family);
    font-weight: 500;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 8px top 50%;
    background-size: 7px auto;
}

.light-mode .chart-period-select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}

.chart-period-select:hover {
    background-color: var(--bg-surface);
    border-color: rgba(255, 255, 255, 0.1);
}

.chart-period-select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.chart-container {
    flex: 1;
    display: flex;
    align-items: flex-end;
    padding-top: 10px;
    padding-bottom: 10px;
}

.bar-chart {
    width: 100%;
    height: 140px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 6px;
}

.bar {
    flex: 1;
    background-color: #84fab0;
    border-radius: 8px 8px 0 0;
    position: relative;
    opacity: 0.7;
    transition: 0.3s;
}

.bar:hover {
    opacity: 1;
}

.bar::before {
    content: attr(data-amount);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -6px);
    background-color: var(--bg-card);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
    z-index: 5;
}

.bar:hover::before {
    opacity: 1;
    transform: translate(-50%, -10px);
}

.bar::after {
    content: attr(data-label);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-secondary);
}

/* Bills Card */
.bills-card {
    grid-column: 2 / 4;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.actions {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.actions i {
    cursor: pointer;
    transition: color 0.3s;
}

.actions i:hover {
    color: var(--text-primary);
}

.bills-list {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.empty-transactions {
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    text-align: center;
}

.empty-transactions-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background-color: var(--bg-surface-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-transactions-icon i {
    font-size: 18px;
}

.empty-transactions-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.empty-transactions-subtitle {
    font-size: 13px;
    max-width: 260px;
}

.bills-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    font-size: 12px;
    color: var(--text-secondary);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.bill-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    padding: 9px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.bill-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.bill-name i {
    width: 22px;
    height: 22px;
    background-color: var(--bg-surface-hover);
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

.bill-status {
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 11px;
    text-align: center;
    width: fit-content;
}

.bill-status.paid {
    background-color: var(--accent-bg);
    color: var(--accent-color);
}

.bill-status.overdue {
    background-color: var(--danger-bg);
    color: var(--danger-color);
}

.bill-status.pending {
    background-color: var(--warning-bg);
    color: var(--warning-color);
}

.bill-action {
    text-align: right;
    color: var(--text-secondary);
    cursor: pointer;
}

.bill-amount.positive {
    color: var(--accent-color);
    font-weight: 600;
}

.bill-amount.negative {
    color: var(--danger-color);
    font-weight: 600;
}

.bill-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bill-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Selected Savings Card Glow */
#selected-savings-card {
    position: relative;
    overflow: hidden;
}

#selected-savings-card>div {
    position: relative;
    z-index: 1;
}

/* Transaction Card (Deposit/Withdraw) */
.transaction-card {
    justify-content: flex-start;
    /* Align to top */
    flex: 1;
    padding: 14px;
    max-height: 200px;
    /* Cap the height */
    margin-top: auto;
    /* Push to bottom if space allows */
}

.transaction-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    /* Ensure full width */
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Reduced from 8px */
}

.input-group label {
    font-size: 12px;
    /* Slightly smaller */
    color: var(--text-secondary);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--input-bg);
    border-radius: 14px;
    /* Slightly smaller radius */
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.input-wrapper:hover {
    background-color: var(--input-bg-hover);
}

.input-wrapper:focus-within {
    background-color: var(--input-bg-hover);
    border-color: transparent;
}

.input-prefix {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    pointer-events: none;
    transition: color 0.3s;
}

.input-wrapper:focus-within .input-prefix {
    color: #82e87d;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 36px;
    /* Reduced padding */
    background-color: transparent;
    border: none;
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 16px;
    /* Reduced from 18px */
    font-weight: 600;
    font-family: var(--font-family);
    outline: none;
    letter-spacing: 0.5px;
}

.input-wrapper input:focus {
    background-color: transparent;
    border-color: transparent;
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Remove number input arrows */
.input-wrapper input::-webkit-outer-spin-button,
.input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-wrapper input[type=number],
.input-wrapper input[type=text] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.transaction-buttons {
    display: flex;
    gap: 8px;
    /* Reduced gap */
}

.btn-deposit,
.btn-withdraw {
    flex: 1;
    padding: 10px;
    border-radius: 24px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-family: var(--font-family);
    transition: all 0.3s;
}

.btn-deposit {
    background-color: #65B884;
    background-image: none;
    color: #000;
}

.btn-deposit:hover {
    opacity: 0.9;
}

.btn-withdraw {
    background-color: var(--btn-secondary-bg);
    color: var(--text-secondary);
    border: none;
}

.btn-withdraw:hover {
    background-color: var(--btn-secondary-hover);
    color: var(--text-primary);
}

.text-muted {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 11px;
    margin-left: 3px;
}

/* Cards Widget */
.cards-widget {
    position: relative;
    overflow: hidden;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-premium {
    background-color: #7dd3e8;
    color: #000;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.cards-visuals {
    position: relative;
    height: 100%;
    min-height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    margin-top: 0;
}

.realistic-card {
    width: 380px;
    height: 240px;
    border-radius: 14px;
    background-color: #0a0a0a;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    color: #fff;
    font-family: 'Inter', sans-serif;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    display: block;
    border: 0.3px solid #333;
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(-45deg,
            rgba(255, 255, 255, 0.15),
            rgba(255, 255, 255, 0.15) 1px,
            transparent 1px,
            transparent 4px);
    opacity: 0.6;
    z-index: 0;
    mask-image: url('world_map.svg');
    -webkit-mask-image: url('world_map.svg');
    mask-size: 110% auto;
    -webkit-mask-size: 110% auto;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
}

/* Remove the old pseudo-element approximation */
.card-background::before {
    display: none;
}

.card-bank-name-top-left {
    position: absolute;
    top: 25px;
    left: 25px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-family: 'Inter', sans-serif;
}

.card-logo-wrapper {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(100, 100, 100, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.card-logo-wrapper i {
    font-size: 24px;
    color: rgba(100, 100, 100, 0.8);
}

.card-chip-left {
    position: absolute;
    top: 90px;
    left: 25px;
    width: 50px;
    height: 38px;
    z-index: 2;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, #d4d4d4 0%, #a0a0a0 100%);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-chip-left svg {
    width: 100%;
    height: 100%;
    opacity: 0.7;
    mix-blend-mode: multiply;
}

.card-contactless-icon {
    position: absolute;
    top: 100px;
    left: 87px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    transform: rotate(90deg);
    z-index: 2;
}

.card-name-wrapper {
    position: absolute;
    bottom: 25px;
    left: 25px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-name-wrapper .card-value {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    color: #dbdbdb;
    font-family: 'Inter', sans-serif;
}

.card-type-box {
    position: absolute;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    z-index: 2;
}

.card-type-box i {
    color: #cfcfcfc4;
    font-size: 36px;
}

/* Removed old card rows */

.card-brand-logo {
    opacity: 0.95;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Search Bar Animation */
.search-wrapper {
    display: flex;
    align-items: center;
    background-color: transparent;
    border-radius: 50px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    position: relative;
}

.search-wrapper.active {
    background-color: var(--bg-surface);
    padding: 0 5px 0 20px;
    /* Force width to expand */
    width: 250px;
}

.search-input {
    width: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    font-size: 14px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    padding: 0;
    font-family: var(--font-family);
    pointer-events: none;
}

.search-wrapper.active .search-input {
    width: 100%;
    opacity: 1;
    margin-right: 5px;
    pointer-events: auto;
}

.search-wrapper.active #search-toggle {
    background-color: transparent;
    color: var(--text-primary);
}

/* Ensure smooth transitions for other header elements */
.top-nav,
.logo-section,
.top-actions {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loans Page Styles */
.loans-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 14px;
    height: 100%;
}

.credit-score-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credit-score-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.score-circle {
    width: 180px;
    height: 180px;
    position: relative;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: var(--bg-surface);
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out, stroke 0.3s ease;
}

.score-text {
    fill: var(--text-primary);
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 8px;
    text-anchor: middle;
    dominant-baseline: middle;
}

.score-info {
    text-align: center;
}

.score-label {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-color);
}

.score-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 5px;
    max-width: 200px;
    line-height: 1.4;
}

.loan-limit-info {
    background-color: var(--bg-surface);
    padding: 12px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
}

.loan-limit-info span:last-child {
    color: var(--accent-color);
}

/* Active Loans List */
.active-loans-card {
    display: flex;
    flex-direction: column;
}

.loans-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
}

.no-loans-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    gap: 10px;
    min-height: 200px;
}

.no-loans-placeholder i {
    font-size: 40px;
    opacity: 0.5;
}

.loan-item {
    background-color: var(--bg-surface);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.loan-item:hover {
    border-color: var(--border-color);
}

.loan-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loan-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.loan-remaining {
    font-size: 13px;
    color: var(--text-secondary);
}

.loan-remaining span {
    color: var(--danger-color);
    font-weight: 600;
}

.loan-next-payment {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    background-color: var(--bg-surface-hover);
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
}

.loan-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-pay {
    background-color: var(--accent-color);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-pay:hover {
    opacity: 0.9;
}

/* Loan Modal Styles */
.loan-terms-info {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.term-item {
    flex: 1;
    background-color: var(--bg-surface);
    padding: 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.term-item span:first-child {
    font-size: 11px;
    color: var(--text-secondary);
}

.term-item .highlight {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 15px;
}

.term-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    outline: none;
    text-align: center;
    width: 100%;
}

.term-select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.input-helper {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: right;
}

.loan-summary-box {
    background-color: var(--bg-surface);
    padding: 12px;
    border-radius: 10px;
    margin-top: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
}

.summary-row span:last-child {
    color: var(--danger-color);
}

/* Payment Modal */
.loan-payment-info {
    margin-bottom: 15px;
    text-align: center;
}

.payment-remaining-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.payment-remaining-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 110%;
    /* Below the search bar */
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    padding: 5px;
}

.search-results.visible {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

/* Transaction Filter Dropdown */
.filter-wrapper {
    position: relative;
}

.filter-select {
    appearance: none;
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border: 1px solid transparent;
    padding: 6px 30px 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-family: var(--font-family);
    font-weight: 500;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 8px auto;
}

.light-mode .filter-select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}

.filter-select:hover {
    background-color: var(--bg-surface);
    border-color: rgba(255, 255, 255, 0.1);
}

.filter-select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

/* Pagination Styles */
.pagination-footer {
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    /* Match card bg */
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.pagination-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.page-btn {
    min-width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.page-btn.active {
    background-color: var(--accent-color);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-primary);
    gap: 12px;
    margin-bottom: 2px;
}

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

.search-result-item:hover {
    background-color: var(--bg-surface-hover);
}

.search-result-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
    overflow: hidden;
    /* Ensure image respects border radius */
}

.search-result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-name {
    font-size: 13px;
    font-weight: 600;
}

.search-result-id {
    font-size: 11px;
    color: var(--text-secondary);
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.no-results i {
    font-size: 20px;
    margin-bottom: 5px;
    opacity: 0.5;
}

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

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

/* Modal Styles */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-card);
    width: 400px;
    border-radius: 20px;
    padding: 24px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

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

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.close-modal-btn:hover {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

/* Quick Amounts */
.quick-amounts {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.amount-chip {
    background-color: var(--bg-surface);
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    font-family: var(--font-family);
    transition: 0.2s;
    flex: 1;
    text-align: center;
}

.amount-chip:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.amount-chip:active {
    transform: scale(0.95);
}

/* Modal Search Results */
.modal-search-results {
    position: absolute;
    top: 75px;
    /* Adjust based on input height */
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    /* Match top search */
    border: 1px solid var(--border-color);
    border-radius: 15px;
    /* Match top search */
    max-height: 200px;
    /* Slightly taller */
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    /* Match top search */
    padding: 5px;
}

.modal-search-results.visible {
    display: block;
}

/* Reuse search result item styles but tweak for modal */
.modal-search-results .search-result-item {
    padding: 8px 12px;
}

.modal-search-results .search-result-item:hover {
    background-color: var(--bg-surface-hover);
}

.input-group {
    position: relative;
    /* For absolute positioning of dropdown */
}

.transaction-toggle {
    display: flex;
    background-color: #111;
    /* Very dark background */
    padding: 4px;
    border-radius: 30px;
    /* Pill shape */
    gap: 0;
    border: 1px solid #333;
    position: relative;
    width: 100%;
    /* Or a fixed width */
    max-width: 300px;
    /* Limit width */
}

.toggle-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 25px;
    font-family: var(--font-family);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
    text-align: center;
}

.toggle-btn.active {
    background-color: var(--accent-color);
    /* Matches footer button */
    color: #000;
    /* Black text on bright background */
    box-shadow: none;
    /* Removed glow */
}

.toggle-btn:hover:not(.active) {
    color: #fff;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer button {
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--font-family);
    transition: 0.3s;
}

.modal-footer .btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-secondary);
}

.modal-footer .btn-secondary:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.modal-footer .btn-primary {
    background-color: var(--accent-color);
    color: #000;
}

.modal-footer .btn-primary:hover {
    opacity: 0.9;
}

/* Notification Panel */
.notifications-panel {
    position: absolute;
    top: 70px;
    right: 60px;
    width: 350px;
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 100;
    max-height: 400px;
    overflow: hidden;
}

.notifications-panel.visible {
    display: flex;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notifications-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
}

.clear-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
}

.clear-btn:hover {
    color: var(--text-primary);
}

.notifications-list {
    overflow-y: auto;
    flex: 1;
}

.notification-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-color);
    font-size: 14px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    background-color: var(--bg-surface);
    padding: 8px;
    border-radius: 8px;
}

.notification-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.btn-accept,
.btn-deny {
    flex: 1;
    padding: 8px;
    border-radius: 12px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-accept {
    background-color: var(--accent-color);
    color: #000;
}

.btn-accept:hover {
    opacity: 0.9;
}

.btn-deny {
    background-color: var(--bg-surface);
    color: var(--text-secondary);
}

.btn-deny:hover {
    background-color: var(--danger-bg);
    color: var(--danger-color);
}

.notification-dot {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger-color);
    border: 2px solid var(--bg-dark);
}

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

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

/* Add Account Card Styles */
.add-account-card {
    cursor: pointer;
    border: 1px solid var(--border-color);
    background-color: transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.add-account-card:hover {
    border-color: var(--accent-color);
    background-color: var(--bg-surface);
}

.add-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background-color: var(--bg-surface);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.add-account-card:hover .add-icon {
    background-color: var(--accent-bg);
    color: var(--accent-color);
}

.add-account-card .wallet-info {
    width: 100%;
}

.add-account-card .wallet-currency {
    color: var(--text-secondary);
    font-size: 12px;
}

.add-account-card .wallet-amount {
    color: var(--text-primary);
    font-size: 14px;
}

/* Redesigned Loan Item Styles */
.loan-item {
    flex-direction: column !important;
    gap: 15px;
    align-items: stretch !important;
}

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

.loan-status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.loan-status-badge.active {
    background-color: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

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

.progress-bar {
    height: 6px;
    background: var(--bg-surface-hover);
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 3px;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.loan-payment-section {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.payment-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--input-bg);
    border-radius: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.payment-input-wrapper:hover {
    background-color: var(--input-bg-hover);
}

.payment-input-wrapper:focus-within {
    background-color: var(--input-bg-hover);
    border-color: transparent;
}

.input-prefix-loan {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    pointer-events: none;
    transition: color 0.3s;
}

.payment-input-wrapper:focus-within .input-prefix-loan {
    color: #82e87d;
}

.payment-input {
    width: 100%;
    padding: 12px 12px 12px 36px;
    background-color: transparent;
    border: none;
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-family);
    outline: none;
    letter-spacing: 0.5px;
}

.payment-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Remove arrows from number input */
.payment-input::-webkit-outer-spin-button,
.payment-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-max {
    position: absolute;
    right: 10px;
    background-color: var(--bg-surface);
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}

.btn-max:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-pay-action {
    background-color: #65B884;
    color: #000;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-family: var(--font-family);
    transition: all 0.3s;
}

.btn-pay-action:hover {
    opacity: 0.9;
}

/* Icon Type Toggle */
.icon-type-toggle {
    margin-top: -1px;
    background-color: #fff;
    padding: 2px;
    border-radius: 50%;
}

.icon-type-toggle {
    display: flex;
    background-color: #111;
    padding: 4px;
    border-radius: 30px;
    gap: 0;
    border: 1px solid #333;
    position: relative;
    width: 100%;
}

.icon-type-toggle .toggle-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 25px;
    font-family: var(--font-family);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
    text-align: center;
}

.icon-type-toggle .toggle-btn.active {
    background-color: var(--accent-color);
    color: #000;
    box-shadow: none;
}

.icon-type-toggle .toggle-btn:hover:not(.active) {
    color: #fff;
}

/* Preset Icons Grid */
#preset-icons-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preset-icons-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
}

.preset-icon-item {
    aspect-ratio: 1;
    background-color: var(--bg-surface);
    border: 2px solid transparent;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    color: var(--text-secondary);
}

.preset-icon-item:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.preset-icon-item.active {
    background-color: var(--accent-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.preset-icon-item i {
    font-size: 24px;
}

/* Image URL Section */
#image-url-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Give the Image URL text a bit more space from the icon */
#image-url-section .input-wrapper input {
    padding-left: 44px;
    /* Slightly more than the default to match the look of the $ prefix */
}

/* Savings Page Styles */
.savings-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
}

.savings-account-card {
    background-color: var(--bg-surface);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid transparent;
    position: relative;
}

.savings-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.savings-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.savings-type-badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--bg-surface-hover);
    color: var(--text-secondary);
}

.savings-balance {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.savings-info {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-secondary);
}

.savings-info-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.savings-info-item i {
    color: var(--accent-color);
}

.savings-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Savings Type Selection (Modal) */
.savings-types-grid {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.savings-type-card {
    flex: 1;
    min-width: 200px;
    background-color: var(--bg-surface);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.savings-type-card:hover {
    background-color: var(--bg-surface-hover);
}

.savings-type-card.selected {
    background-color: var(--bg-surface-hover);
    border-color: var(--accent-color);
}

.savings-type-icon {
    width: 80px;
    height: 80px;
    border-radius: 0;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.savings-type-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    opacity: 0.4;
    border-radius: 50%;
    z-index: -1;
    filter: blur(15px);
    pointer-events: none;
}

.savings-type-card.selected .savings-type-icon {
    color: var(--accent-color);
    background-color: transparent;
}

/* Selected Account Icon Glow (Savings Page) */
.selected-account-icon {
    position: relative;
    z-index: 1;
}

.selected-account-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--glow-color, rgba(255, 255, 255, 0.12)) 0%, transparent 70%);
    opacity: 0.5;
    border-radius: 50%;
    z-index: -1;
    filter: blur(12px);
    pointer-events: none;
}

.savings-type-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.savings-type-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.savings-type-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    background: var(--bg-card);
    padding: 10px;
    border-radius: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-val {
    font-weight: 600;
    color: var(--text-primary);
}

.highlight-green {
    color: var(--accent-color);
}

/* --- Savings Landing Page --- */
.savings-landing-container {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    height: 100%;
    box-sizing: border-box;
    /* Use transparent or surface color to blend with dashboard */
    /* background: transparent; */

    /* Green Accent Radial Gradient Background */
    background: radial-gradient(circle at 50% 110%,
            rgba(101, 184, 132, 0.25) 0%,
            rgba(101, 184, 132, 0.1) 30%,
            rgba(101, 184, 132, 0.01) 60%,
            transparent 80%);
    /* Fallback or overlay if needed */
}

.savings-landing-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1000px;
    width: 100%;
    /* Add a subtle card background behind the content if desired, or keep clean */
}

.savings-landing-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-vault-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    /* Optional: keep animation if desired, or remove to be static */
    animation: floatSafe 8s ease-in-out infinite;
}

@keyframes floatSafe {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.savings-landing-text {
    flex: 1.2;
    color: var(--text-primary);
    text-align: left;
}

.savings-landing-text h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.highlight-accent {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.savings-landing-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 450px;
    line-height: 1.6;
    font-weight: 400;
}

.btn-primary-lg {
    background-color: var(--accent-color);
    color: #000;
    /* Black text on light green accent for contrast */
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-family);
}

.btn-primary-lg:hover {
    background-color: #549c6f;
    /* Slightly darker green */
}

.btn-primary-lg i {
    font-size: 1.1rem;
}

/* Hide regular dashboard when landing is active */
.dashboard-hidden {
    display: none !important;
}

/* Landing Page Stats */
.landing-stats-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: fit-content;
}

.landing-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.landing-stat-val {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.landing-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.landing-stat-divider {
    width: 1px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.1);
}