

* {

    box-sizing: border-box;

}

body {

    font-family: "Avenir Next", sans-serif;

    font-size: 14px;

    max-width: 500px;

    margin: 0 auto;

    padding: 24px 20px;

    background: #f7f7f7;

    color: #222;

}

h1 {

    margin: 0 0 10px;

}

h2 {

    margin-top: 0;

    margin-bottom: 12px;

}

h3 {

    margin: 0 0 8px;

    font-size: 1rem;

}

section {

    background: white;

    padding: 18px 20px;

    margin-bottom: 14px;

    border-radius: 8px;

}

.expense-group {

    margin-bottom: 14px;

}

.budget-row {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 0px;

    margin-bottom: 2px;

}

.budget-row label {

    flex: 1;

}

input {

    width: 110px;

    padding: 0px 0px 0px 0px;

    text-align: right;

    border: 1px solid #ccc;

    border-radius: 4px;

    font: inherit;

}
.input-wrapper {

    position: relative;

}

.currency {

    position: absolute;

    left: 10px;

    top: 50%;

    transform: translateY(-50%);

    pointer-events: none;

}

.input-wrapper input {

    padding-left: 25px;

}
input:focus {

    outline: 2px solid #555;

    outline-offset: 1px;

}

.summary p {

    display: flex;

    justify-content: space-between;

    margin: 3px 0;

}

.summary #remaining {

    font-weight: bold;

}

.summary-value {

    display: flex;

    gap: 6px;

}

.summary-detail {

    font-size: 0.9rem;

}

.unallocated-row {

    font-size: 1rem;

    font-weight: bold;

    border-top: 1px solid #ccc;

    padding-top: 10px;

    margin-top: 10px;

}
button {

    margin-top: 20px;

    padding: 8px 14px;

    font: inherit;

    cursor: pointer;

    }


.over-budget {

    color: #b00020;

}


@media (max-width: 500px) {

    body {

        padding: 12px 8px;

    }

    section {

        padding: 14px 12px;

    }

    .budget-row {

        gap: 10px;

    }

    input {

        width: 92px;

    }

}