.dashboard-v2 {
    color: var(--app-text);
}

.dashboard-v2 .dashboard-intro {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem 1.25rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background:
        radial-gradient(520px 180px at top right, rgba(244, 168, 127, 0.1), transparent 72%),
        linear-gradient(165deg, rgba(18, 22, 29, 0.98), rgba(12, 15, 21, 0.96));
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}

.dashboard-v2 .dashboard-intro-copy {
    flex: 1 1 420px;
    min-width: 0;
}

.dashboard-v2 .dashboard-intro-copy h2 {
    margin-top: 0.55rem;
    font-size: clamp(1.55rem, 3.2vw, 2.25rem);
    line-height: 1.04;
}

.dashboard-v2 .dashboard-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(244, 168, 127, 0.12);
    color: #ffd5bf;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-v2 .dashboard-intro-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.dashboard-v2 .dashboard-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #ced8eb;
    font-size: 0.82rem;
}

.dashboard-v2 .dashboard-intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: flex-end;
}

.dashboard-v2 .dashboard-panel {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: linear-gradient(165deg, rgba(18, 22, 29, 0.96), rgba(12, 15, 21, 0.96));
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
    padding: 1.05rem;
}

.dashboard-v2 .dashboard-transactions-panel {
    height: auto !important;
    min-height: 0;
}

.dashboard-v2 .panel-head h5,
.dashboard-v2 h5 {
    font-size: 1.1rem;
    font-weight: 700;
}

.panel-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(28, 34, 44, 0.9);
    color: var(--app-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.virtual-card {
    border-radius: 18px;
    padding: 1.15rem;
    min-height: 188px;
    background: linear-gradient(145deg, #f6ba99, #f0a274);
    color: #18120e;
    box-shadow: inset 0 -28px 45px rgba(255, 255, 255, 0.14), 0 16px 26px rgba(242, 162, 114, 0.26);
}

.virtual-card-balance {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.virtual-card-brand {
    font-weight: 800;
    letter-spacing: 0.06em;
}

.virtual-card-number {
    margin: 1.15rem 0;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.virtual-card-label {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.virtual-card-value {
    font-size: 0.82rem;
    font-weight: 700;
}

.card-info-list {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(21, 26, 34, 0.72);
}

.card-info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.72rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.93rem;
}

.card-info-row:last-child {
    border-bottom: 0;
}

.card-info-row span {
    color: var(--app-text-muted);
}

.card-info-row strong {
    color: #f5f8ff;
    font-weight: 600;
}

.payment-list {
    display: grid;
    gap: 0.62rem;
}

.payment-item {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    padding: 0.66rem 0.72rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(24, 29, 37, 0.75);
    text-decoration: none;
    color: inherit;
}

.payment-item:hover {
    border-color: rgba(126, 227, 193, 0.26);
    background: rgba(32, 39, 49, 0.86);
}

.payment-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #ced8eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.payment-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.payment-title {
    color: #f7f9ff;
    font-size: 0.92rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-note {
    color: var(--app-text-muted);
    font-size: 0.76rem;
}

.payment-right {
    margin-left: auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.payment-amount {
    font-weight: 700;
    color: #ffd1ba;
    font-size: 0.88rem;
}

.payment-badge {
    margin-top: 0.16rem;
    font-size: 0.68rem;
    text-transform: capitalize;
    padding: 0.06rem 0.36rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.payment-badge-overdue {
    color: #ff9aa4;
    background: rgba(255, 127, 140, 0.15);
    border-color: rgba(255, 127, 140, 0.32);
}

.payment-badge-today,
.payment-badge-soon {
    color: #ffd39a;
    background: rgba(244, 168, 127, 0.18);
    border-color: rgba(244, 168, 127, 0.3);
}

.payment-badge-future,
.payment-badge-unknown {
    color: #95efcd;
    background: rgba(126, 227, 193, 0.15);
    border-color: rgba(126, 227, 193, 0.32);
}

.balance-panel .total-balance {
    font-size: clamp(1.8rem, 3.3vw, 2.2rem);
    font-weight: 800;
    line-height: 1.1;
}

.metric-tile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    background: rgba(25, 31, 40, 0.84);
}

.metric-title {
    color: var(--app-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    color: #f4f7ff;
    font-size: 0.95rem;
    font-weight: 700;
}

.metric-ring {
    --pct: 50;
    --ring-color: #7ee3c1;
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.09) 0);
}

.metric-ring::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: #10151c;
}

.metric-ring span {
    position: relative;
    z-index: 1;
    font-size: 0.74rem;
    font-weight: 700;
    color: #dffcea;
}

.metric-ring.outcome {
    --ring-color: #f3ae83;
}

.metric-ring.outcome span {
    color: #ffe5d3;
}

.chart-shell {
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    background: rgba(21, 25, 33, 0.82);
    padding: 0.85rem;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 260px;
}

#incomeExpenseChart {
    width: 100% !important;
    height: 260px !important;
    display: block;
}

.transaction-list {
    display: grid;
    gap: 0.62rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.64rem 0.72rem;
    background: rgba(24, 29, 37, 0.72);
    min-width: 0;
}

.transaction-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #c9d4e6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.transaction-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.transaction-title {
    color: #f7f9ff;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-date {
    color: var(--app-text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-amount {
    margin-left: auto;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

.transaction-amount.income {
    color: #90f4d3;
}

.transaction-amount.expense {
    color: #ffb899;
}

html[data-theme="light"] .dashboard-v2 .dashboard-panel {
    border: 1px solid #d4dfeb;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96));
    box-shadow: 0 12px 24px rgba(16, 40, 63, 0.08);
}

html[data-theme="light"] .dashboard-v2 .dashboard-intro {
    border-color: #d4dfeb;
    background:
        radial-gradient(520px 180px at top right, rgba(31, 95, 191, 0.08), transparent 72%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96));
    box-shadow: 0 12px 24px rgba(16, 40, 63, 0.08);
}

html[data-theme="light"] .dashboard-v2 .dashboard-kicker {
    background: rgba(31, 95, 191, 0.1);
    color: #1f5fbf;
}

html[data-theme="light"] .dashboard-v2 .dashboard-chip {
    border-color: #d5e0ec;
    background: rgba(255, 255, 255, 0.98);
    color: #5c758e;
}

html[data-theme="light"] .panel-icon-btn {
    border-color: #ccd8e5;
    background: rgba(248, 252, 255, 0.98);
    color: #617a93;
}

html[data-theme="light"] .card-info-list {
    border-color: #d6e1ed;
    background: rgba(249, 252, 255, 0.95);
}

html[data-theme="light"] .card-info-row {
    border-bottom-color: #dce5ef;
}

html[data-theme="light"] .card-info-row strong {
    color: #17324b;
}

html[data-theme="light"] .payment-item {
    border-color: #d5e0ec;
    background: rgba(255, 255, 255, 0.95);
}

html[data-theme="light"] .payment-item:hover {
    border-color: rgba(31, 95, 191, 0.28);
    background: rgba(243, 248, 255, 0.98);
}

html[data-theme="light"] .payment-icon {
    background: rgba(31, 95, 191, 0.1);
    color: #2b5f95;
}

html[data-theme="light"] .payment-title {
    color: #17324b;
}

html[data-theme="light"] .payment-amount {
    color: #235594;
}

html[data-theme="light"] .payment-badge-overdue {
    color: #b3465d;
    background: rgba(191, 74, 96, 0.12);
    border-color: rgba(191, 74, 96, 0.3);
}

html[data-theme="light"] .payment-badge-today,
html[data-theme="light"] .payment-badge-soon {
    color: #8b5a12;
    background: rgba(211, 143, 49, 0.14);
    border-color: rgba(211, 143, 49, 0.3);
}

html[data-theme="light"] .payment-badge-future,
html[data-theme="light"] .payment-badge-unknown {
    color: #176b4d;
    background: rgba(22, 134, 95, 0.12);
    border-color: rgba(22, 134, 95, 0.3);
}

html[data-theme="light"] .metric-tile {
    border-color: #d5e0ec;
    background: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] .metric-value {
    color: #17324b;
}

html[data-theme="light"] .metric-ring {
    background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), rgba(31, 95, 191, 0.12) 0);
}

html[data-theme="light"] .metric-ring::before {
    background: #f3f8ff;
}

html[data-theme="light"] .metric-ring span {
    color: #166f51;
}

html[data-theme="light"] .metric-ring.outcome span {
    color: #8f5615;
}

html[data-theme="light"] .chart-shell {
    border-color: #d5e0ec;
    background: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] .transaction-item {
    border-color: #d5e0ec;
    background: rgba(255, 255, 255, 0.95);
}

html[data-theme="light"] .transaction-icon {
    background: rgba(31, 95, 191, 0.1);
    color: #2b5f95;
}

html[data-theme="light"] .transaction-title {
    color: #17324b;
}

html[data-theme="light"] .transaction-amount.income {
    color: #176b4d;
}

html[data-theme="light"] .transaction-amount.expense {
    color: #ad4c36;
}

@media (max-width: 1199.98px) {
    .dashboard-v2 .dashboard-intro,
    .dashboard-v2 .dashboard-panel {
        border-radius: 18px;
    }
}

@media (max-width: 991.98px) {
    .dashboard-v2 .dashboard-intro-actions {
        justify-content: flex-start;
    }

    .chart-wrapper {
        height: 230px;
    }
}

@media (max-width: 575.98px) {
    .dashboard-v2 .dashboard-intro,
    .dashboard-v2 .dashboard-panel {
        padding: 0.85rem;
    }

    .virtual-card-balance {
        font-size: 1.45rem;
    }

    .virtual-card-number {
        font-size: 0.9rem;
    }

    .chart-wrapper {
        height: 210px;
    }

    .transaction-item {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "icon meta"
            "icon amount";
        align-items: start;
    }

    .transaction-icon {
        grid-area: icon;
    }

    .transaction-meta {
        grid-area: meta;
    }

    .transaction-amount {
        grid-area: amount;
        margin-left: 0;
        text-align: left;
    }
}
