:root {
    --bg: #101114;
    --card: #191b20;
    --card-light: #20232a;
    --text: #f1f1f3;
    --muted: #858995;
    --border: #2b2e36;
    --green: #83d6a0;
    --blue: #83b9f5;
    --orange: #eab879;
    --red: #ed8585;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
}

.header {
    max-width: 1200px;
    margin: auto;
    padding: 35px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    margin: 0;
    font-size: 29px;
    letter-spacing: 3px;
    font-weight: 800;
}

.header h1 span {
    color: var(--green);
}

.header p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.month {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 16px;
    color: var(--muted);
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 24px 40px;
}

.funds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.fund-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.fund-card span {
    color: var(--muted);
    font-size: 14px;
}

.fund-card strong {
    font-size: 29px;
    font-weight: 700;
}

.fund-card small {
    color: var(--muted);
}

.mandatory strong {
    color: var(--orange);
}

.savings strong {
    color: var(--blue);
}

.happiness strong {
    color: var(--green);
}

.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 20px;
}

h2 {
    margin: 0 0 22px;
    font-size: 18px;
    font-weight: 650;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-heading span {
    color: var(--green);
    font-weight: 700;
}

.progress-track {
    width: 100%;
    height: 9px;
    background: var(--card-light);
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 20px;
    transition: width .3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 13px;
}

.category-list {
    margin-top: 25px;
}

.category-item,
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.category-item:last-child,
.history-item:last-child {
    border-bottom: none;
}

.category-item div,
.history-item div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-item small,
.history-item small {
    color: var(--muted);
    font-size: 12px;
}

.category-values {
    text-align: right;
}

.forms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 20px;
}

.forms-grid .panel {
    margin-bottom: 20px;
}

label {
    display: block;
    margin: 17px 0 8px;
    color: var(--muted);
    font-size: 13px;
}

input,
select {
    display: block;
    width: 100%;
    padding: 14px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-light);
    color: var(--text);
    font-size: 15px;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--green);
}

input::placeholder {
    color: #656a75;
}

button {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--green);
    color: #111713;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
}

button:hover {
    opacity: .85;
}

.secondary-button {
    background: var(--card-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.positive {
    color: var(--green);
}

.negative {
    color: var(--red);
}

.empty {
    color: var(--muted);
    font-size: 13px;
}

.new-month-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.new-month-panel h2 {
    margin-bottom: 8px;
}

.new-month-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.new-month-panel form {
    min-width: 200px;
}

.new-month-panel button {
    margin: 0;
}

footer {
    text-align: center;
    padding: 25px;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 700px) {
    .header {
        padding: 25px 18px;
    }

    .container {
        padding: 0 14px 25px;
    }

    .funds {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .fund-card {
        padding: 19px;
        gap: 9px;
    }

    .fund-card strong {
        font-size: 25px;
    }

    .forms-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 20px 17px;
    }

    .progress-info {
        flex-direction: column;
    }

    .new-month-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .new-month-panel form {
        width: 100%;
    }

    .category-item,
    .history-item {
        align-items: flex-start;
    }

    .history-item > strong {
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    .header h1 {
        font-size: 24px;
    }

    .month {
        font-size: 12px;
        padding: 9px;
    }
}
