/* Summary Cards Row */
.home-summary-cards {
    display: flex;
    gap: 10px;
    padding: 0 16px;
    margin-top: -22px;
}

.home-stat-card {
    flex: 1;
    background: var(--tg-theme-bg-color, #fff);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.home-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--hint-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.home-stat-value {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

/* Home Sections */
.home-section {
    padding: 20px 16px 0 16px;
}

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

.home-section-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-color);
}

.home-see-all {
    background: none;
    border: none;
    color: var(--button-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 0;
}

.home-section-hint {
    font-size: 12px;
    color: var(--hint-color);
    font-weight: 500;
}

/* Upcoming Payments Scroll */
.home-upcoming-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.home-upcoming-scroll::-webkit-scrollbar {
    display: none;
}

.home-upcoming-card {
    min-width: 150px;
    max-width: 170px;
    background: var(--tg-theme-bg-color, #fff);
    border: 1.5px solid var(--secondary-bg-color);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease;
    cursor: pointer;
}

.home-upcoming-card:active {
    transform: scale(0.97);
}

.home-upcoming-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--danger-color), #ff6b6b);
    border-radius: 14px 14px 0 0;
}

.home-upcoming-card.soon::before {
    background: linear-gradient(90deg, #ff9500, #ffcc00);
}

.home-upcoming-card.later::before {
    background: linear-gradient(90deg, var(--success-color), #5ad87a);
}

.home-upcoming-icon {
    font-size: 24px;
    line-height: 1;
}

.home-upcoming-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-upcoming-amount {
    font-size: 16px;
    font-weight: 800;
    color: var(--danger-color);
}

.home-upcoming-due {
    font-size: 11px;
    font-weight: 600;
    color: var(--hint-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Spending Categories */
.home-spending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.home-spending-emoji {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--secondary-bg-color);
    flex-shrink: 0;
}

.home-spending-info {
    flex: 1;
    min-width: 0;
}

.home-spending-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.home-spending-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.home-spending-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--danger-color);
}

.home-spending-bar-bg {
    height: 6px;
    background: var(--secondary-bg-color);
    border-radius: 3px;
    overflow: hidden;
}

.home-spending-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--danger-color), #ff6b6b);
    transition: width 0.6s ease;
}

/* Legacy actions wrapper */
.actions {
    display: flex;
    gap: 16px;
    padding: 24px;
    margin-top: -20px;
}
