﻿.money-page {
    background-color: #050505;
    min-height: calc(100vh - 110px);
    padding: 34px 24px 64px 24px;
    color: white;
}

.money-page-box {
    max-width: 1180px;
    margin: 0 auto;
}

.page-top-line {
    margin-bottom: 22px;
}

.page-top-year {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.money-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.money-summary-card {
    background: linear-gradient(180deg, #141414 0%, #111111 100%);
    border: 1px solid #262626;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.money-summary-label {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.money-summary-value {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.income-value {
    color: #ffffff;
}

.expense-value {
    color: #ff4d4d;
}

.saving-value {
    color: #35d07f;
}

.positive-value {
    color: #35d07f;
}

.negative-value {
    color: #ff4d4d;
}

.money-section-card {
    background: linear-gradient(180deg, #141414 0%, #101010 100%);
    border: 1px solid #262626;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.money-section-header {
    margin-bottom: 16px;
}

    .money-section-header h3 {
        margin: 0;
        font-size: 20px;
        font-weight: 700;
        color: #f5f5f5;
        letter-spacing: -0.2px;
    }

.money-section-header-space {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.money-header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.money-inline-form {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 16px;
}

.money-input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid #2f2f2f;
    background-color: #0d0d0d;
    color: white;
    box-sizing: border-box;
    font-size: 15px;
}

    .money-input::placeholder {
        color: #7d7d7d;
    }

    .money-input:focus {
        outline: none;
        border-color: #35d07f;
        box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.12);
    }

.money-input-small {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
}

.money-add-button {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 14px;
    background-color: #35d07f;
    color: #101010;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

    .money-add-button:hover {
        background-color: #2fb86f;
        transform: translateY(-1px);
    }

.money-main-button {
    height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: none;
    background-color: #35d07f;
    color: #101010;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

    .money-main-button:hover {
        background-color: #2fb86f;
        transform: translateY(-1px);
    }

.money-small-button {
    height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #2f2f2f;
    background-color: #111111;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

    .money-small-button:hover {
        background-color: #171717;
    }

.money-empty-text {
    text-align: center;
    color: #8b8b8b;
    padding: 18px 0 6px 0;
    font-size: 15px;
}

.money-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #151515;
    border: 1px solid #252525;
    border-radius: 16px;
    margin-bottom: 10px;
    transition: background 0.18s ease, border-color 0.18s ease;
}

    .money-item-row:hover {
        border-color: #343434;
        background: #181818;
    }

.income-row {
    padding: 14px 16px;
    min-height: 58px;
}

.expense-row {
    padding: 14px 16px;
    min-height: 58px;
}

.money-item-main {
    min-width: 0;
}

.money-item-title {
    color: #f3f4f6;
    font-size: 16px;
    font-weight: 600;
    word-break: break-word;
}

.money-item-subtitle {
    color: #8b8b8b;
    font-size: 13px;
    margin-top: 3px;
}

.money-item-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 170px;
    flex-shrink: 0;
}

.money-item-price {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    width: 125px;
    text-align: right;
}

.income-price {
    color: #35d07f;
}

.expense-price {
    color: #ff4d4d;
}

.money-remove-form {
    margin: 0;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.money-remove-button {
    opacity: 0;
    visibility: hidden;
    background: none;
    border: none;
    color: #777777;
    cursor: pointer;
    font-size: 15px;
    width: 22px;
    height: 22px;
    line-height: 1;
    padding: 0;
    transition: opacity 0.16s ease, visibility 0.16s ease, color 0.16s ease;
}

.money-item-row:hover .money-remove-button {
    opacity: 1;
    visibility: visible;
}

.money-remove-button:hover {
    color: #ffffff;
}

.popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 20px;
    box-sizing: border-box;
}

.popup-card {
    width: 100%;
    max-width: 760px;
    background: linear-gradient(180deg, #151515 0%, #101010 100%);
    border: 1px solid #262626;
    border-radius: 20px;
    padding: 28px;
    color: white;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.popup-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.popup-close-button {
    background: transparent;
    border: none;
    color: #a0a0a0;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

    .popup-close-button:hover {
        color: #ffffff;
    }

.popup-field {
    margin-bottom: 18px;
}

.popup-label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #f2f2f2;
}

.popup-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.popup-label-row .popup-label {
    margin-bottom: 0;
}

.popup-small-link {
    color: #35d07f;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

    .popup-small-link:hover {
        color: #5cff95;
        text-decoration: underline;
    }

.popup-input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid #2f2f2f;
    background-color: #0d0d0d;
    color: white;
    box-sizing: border-box;
    font-size: 15px;
}

    .popup-input:focus {
        outline: none;
        border-color: #35d07f;
        box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.12);
    }

.popup-save-button {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 14px;
    background-color: #35d07f;
    color: #101010;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

    .popup-save-button:hover {
        background-color: #2fb86f;
        transform: translateY(-1px);
    }

@media (max-width: 1100px) {
    .money-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .money-page {
        padding: 24px 16px 50px 16px;
    }

    .money-summary-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .money-inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .money-input,
    .money-input-small,
    .money-add-button,
    .money-main-button {
        width: 100%;
        max-width: none;
    }

    .money-item-row {
        align-items: flex-start;
    }

    .money-item-side {
        min-width: 120px;
    }

    .money-item-price {
        width: auto;
        min-width: 80px;
        font-size: 15px;
    }

    .popup-card {
        padding: 22px;
    }

    .popup-title {
        font-size: 24px;
    }
}
