
/* 기본 설정 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 30px 16px;
    background-color: #f1f6f2;
    font-family: Arial, sans-serif;
    color: #26382b;
}

/* 전체 화면 */
.container {
    max-width: 700px;
    margin: 0 auto;
}

/* 상단 제목 */
header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    color: #34784a;
    margin-bottom: 8px;
}

header p {
    color: #718075;
    font-size: 14px;
}

/* 입력 카드와 목록 카드 */
.input-area,
.list-area {
    background-color: #ffffff;
    padding: 25px;
    margin-bottom: 22px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(35, 80, 45, 0.07);
}

/* 카드 제목 */
h2 {
    color: #34784a;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
}

/* 입력 그룹 */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: bold;
    color: #405b46;
}

/* 입력칸과 선택 메뉴 */
input,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #dce7de;
    border-radius: 9px;
    background-color: #fbfdfb;
    font-size: 15px;
    color: #26382b;
}

input:focus,
select:focus {
    outline: none;
    border-color: #4b9561;
}

select:disabled {
    background-color: #f0f2f0;
    color: #9aa79d;
    cursor: not-allowed;
}

/* 추가 버튼 */
button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 9px;
    background-color: #438653;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background-color: #326d42;
}

/* 내역 목록 */
#historyList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 내역 한 줄 */
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e3ece5;
    border-radius: 10px;
    background-color: #f9fcf9;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-date {
    color: #829087;
    font-size: 12px;
}

.history-category {
    color: #26382b;
    font-size: 15px;
    font-weight: bold;
}

.history-amount {
    font-size: 15px;
    font-weight: bold;
    white-space: nowrap;
}

.income {
    color: #34784a;
}

.expense {
    color: #d65a5a;
}

/* 목록이 비었을 때 */
.empty-message {
    padding: 25px 10px;
    text-align: center;
    color: #9aa79d;
    font-size: 14px;
}

/* 모바일 화면 */
@media (max-width: 600px) {
    body {
        padding: 18px 12px;
    }

    .input-area,
    .list-area {
        padding: 18px;
    }
}
