
/* 기본 설정 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, "Noto Sans KR", sans-serif;
    background-color: #CDE5D2;
    color: #294535;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 헤더 */
.header {
    background-color: #244C3A;
    color: white;
    padding: 28px 50px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 3px;
}

.subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: #D5E5D8;
}

/* 메인 */
.main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    padding: 60px 20px;
}

/* 입력 카드 */
.form-container {
    width: 100%;
    max-width: 500px;
    background-color: #E5F1E5;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(36, 76, 58, 0.10);
    border: 1px solid #B7D3BC;
}

/* 제목 */
.title-area {
    margin-bottom: 35px;
}

.title-area h1 {
    font-size: 26px;
    color: #244C3A;
    margin-bottom: 10px;
}

.title-area p {
    color: #64816B;
    font-size: 14px;
}

/* 입력 그룹 */
.form-group {
    margin-bottom: 24px;
}

.form-group > label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #365842;
}

/* 입력창 */
input[type="date"],
input[type="number"],
input[type="text"],
select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #B9D2BD;
    border-radius: 8px;
    background-color: #FFFFFF;
    font-size: 15px;
    color: #294535;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
    border-color: #548562;
    box-shadow: 0 0 0 3px rgba(84, 133, 98, 0.15);
}

/* 구분 버튼 */
.type-buttons {
    display: flex;
    gap: 12px;
}

.type-option {
    flex: 1;
    cursor: pointer;
}

.type-option input {
    display: none;
}

.type-option span {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
    border: 1px solid #B9D2BD;
    border-radius: 8px;
    background-color: #FFFFFF;
    color: #64816B;
    transition: 0.2s;
}

.type-option input:checked + span {
    background-color: #244C3A;
    border-color: #244C3A;
    color: #FFFFFF;
    font-weight: bold;
}

/* 금액 */
.amount-input {
    position: relative;
}

.amount-input input {
    padding-right: 45px;
}

.amount-input span {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64816B;
}

/* 추가 버튼 */
.add-button {
    width: 100%;
    height: 52px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    background-color: #244C3A;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-button:hover {
    background-color: #38694D;
}

.add-button:active {
    background-color: #193729;
}

/* 내역 카드 */
.list-container {
    width: 100%;
    max-width: 500px;
    background-color: #DCEBDD;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(36, 76, 58, 0.10);
    border: 1px solid #B7D3BC;
}

.list-title {
    margin-bottom: 25px;
}

.list-title h2 {
    font-size: 22px;
    color: #244C3A;
}

/* 내역 항목 */
.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #C4DCC8;
    gap: 15px;
}

.expense-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.expense-memo {
    font-size: 15px;
    font-weight: bold;
    color: #294535;
}

.expense-details {
    font-size: 13px;
    color: #64816B;
}

.expense-amount {
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
}

/* 지출 금액 */
.expense-amount.expense {
    color: #D93636;
}

/* 수입 금액 */
.expense-amount.income {
    color: #2868C7;
}

/* 내역이 없을 때 */
.empty-message {
    padding: 50px 10px;
    text-align: center;
    color: #64816B;
    font-size: 14px;
}

/* 푸터 */
.footer {
    padding: 20px;
    text-align: center;
    color: #64816B;
    font-size: 12px;
}

/* 모바일 대응 */
@media (max-width: 900px) {
    .main {
        flex-direction: column;
        align-items: center;
        padding: 30px 15px;
    }

    .form-container,
    .list-container {
        max-width: 560px;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 24px;
    }

    .form-container,
    .list-container {
        padding: 25px 20px;
    }

    .title-area h1 {
        font-size: 23px;
    }
}
