.card {
    overflow: hidden;
    position: relative;
    min-height: 260px;
    border-radius: 16px;
    padding: 18px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    display: flex;
    flex-direction: column;

    /* Instead of gradient: */
    background: url("/images/mainpics/card-bgs.svg") no-repeat center/cover;

    border: 1px solid var(--border);
}

/* title stays top-left */
.card-title {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
}



/* Put this AFTER your current .card rule */
@media (max-width: 480px) {
    .card {
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        /* show full image */
        background-color: transparent;
        /* fill the leftover area */
        /* (optional) tweak height/padding for mobile */
        min-height: 200px;
        padding: 12px;
    }

    .card-title {
        font-size: 3rem;
        /* smaller title */
    }

    .card-sub {
        font-size: 0.85rem;
        /* smaller subtitle */
    }

    .card-balance {
        font-size: 1rem;
        /* slightly smaller balance */
    }

    .card-ruble {
        width: 14px;
        height: 14px;
        object-fit: contain;
    }
}

.card-sub {
    opacity: .95;
}

/* amount row with ruble icon */
.card-amount {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.card-balance {
    font-weight: var(--fw-semibold);
    font-size: 1.15rem;
}

.card-ruble {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* keep all card text white */
.card,
.card * {
    color: #fff;
}

/* === bottom-left stack === */
.card-bottom-left {
    position: absolute;
    left: 16px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    /* space between sub and amount rows */
}



/* === QR button: borderless, no bg, only icon + text (bottom-right) === */
.card-qr {
    all: unset;
    /* wipe UA + earlier button styles */
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #fff;
    /* keeps white text */
    /* rebuild only what you need */
}

.card-qr .qr-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
}

.card-qr .qr-label {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.05;
    text-align: right;
}

.card-qr .qr-line:first-child {
    font-weight: var(--fw-semibold);
}

.card-qr .qr-line:last-child {
    opacity: .85;
}

.card-qr:hover .qr-label {
    text-decoration: underline;
}

.card-qr:focus-visible {
    outline: 2px solid var(--brand-yellow);
    outline-offset: 2px;
}

/* === DASHBOARD GRID (2 COLUMNS) ====================================== */
.dashboard-grid {
    display: grid;
    gap: 20px;
}

@media (min-width:800px) {
    .dashboard-grid {
        grid-template-columns: 1fr 320px;
        align-items: start;
    }

    .link-col {
        position: sticky;
        top: 16px;
    }
}

.link-col .module {
    margin-top: 0;
    padding: 14px;
}

.link-col .module-sub {
    margin: 0 0 8px;
    font-size: .9rem;
    color: var(--muted);
}

.cards-col .cards-grid {
    margin-bottom: 0;
}

/* === ACCESSIBILITY =================================================== */
:focus-visible {
    outline: 2px solid var(--brand-yellow);
    outline-offset: 2px;
}
