
/* 기본 설정 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 30px 15px;
    font-family: Arial, "Malgun Gothic", sans-serif;
    background-color: #f3f7f4;
    color: #333;
}

/* 전체 화면 */
.container {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
}

/* 제목 영역 */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    margin-bottom: 8px;
    font-size: 34px;
    color: #16a34a;
}

header p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

/* 입력 영역과 목록 영역 카드 */
.input-section,
.list-section {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 22px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

/* 영역 제목 */
h2 {
    margin-top: 0;
    margin-bottom: 22px;
    font-size: 20px;
    color: #222;
}

/* 입력 항목 */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #444;
}

/* 입력칸과 선택박스 */
.form-group input,
.form-group select {
    width: 100%;
    height: 46px;
    padding: 10px 12px;

    border: 1px solid #dce5de;
    border-radius: 9px;

    font-size: 15px;
    color: #333;
    background-color: #ffffff;

    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* 입력칸 선택 효과 */
.form-group input:focus,
.form-group select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

/* 추가 버튼 */
#add-button {
    width: 100%;
    height: 48px;

    border: none;
    border-radius: 9px;

    background-color: #16a34a;
    color: #ffffff;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition: background-color 0.2s, transform 0.2s;
}

/* 마우스 올렸을 때 */
#add-button:hover {
    background-color: #15803d;
}

/* 버튼 클릭 효과 */
#add-button:active {
    transform: scale(0.98);
}

/* 목록 영역 */
#transaction-list {
    min-height: 100px;
    overflow-x: auto;
}

/* 내역 테이블 */
.transaction-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: center;
}

/* 테이블 제목 */
.transaction-table th {
    padding: 13px 6px;
    background-color: #f0fdf4;
    color: #166534;

    border-bottom: 1px solid #dcfce7;
}

/* 테이블 내용 */
.transaction-table td {
    padding: 14px 6px;
    border-bottom: 1px solid #eeeeee;
}

/* 마지막 행 */
.transaction-table tbody tr:last-child td {
    border-bottom: none;
}

/* 수입 금액 */
.income {
    color: #2563eb;
    font-weight: bold;
}

/* 지출 금액 */
.expense {
    color: #dc2626;
    font-weight: bold;
}

/* 내역이 없을 때 */
.empty-message {
    padding: 30px 0;
    margin: 0;

    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 작은 화면 대응 */
@media (max-width: 480px) {
    body {
        padding: 20px 12px;
    }

    .input-section,
    .list-section {
        padding: 20px 15px;
    }

    .transaction-table {
        font-size: 12px;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 11px 4px;
    }
}
