/* ==============================
   1. 기본 설정
============================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 20px;
    background-color: #FFF7F0;
    color: #3D352F;
    font-family: Arial, sans-serif;
}


/* ==============================
   2. 전체 컨테이너
============================== */

.container {
    max-width: 650px;
    margin: 0 auto;
}


/* ==============================
   3. 헤더
============================== */

header {
    text-align: center;
    margin-bottom: 35px;
}

header h1 {
    font-size: 42px;
    color: #E58A45;
    margin-bottom: 10px;
}

header p {
    color: #A87550;
    font-size: 15px;
}


/* ==============================
   4. 입력 카드
============================== */

.input-section {
    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 24px;
    margin-bottom: 25px;

    /* 카드 그림자 */
    box-shadow: 0 6px 20px rgba(180, 120, 70, 0.08);
}


/* ==============================
   5. 목록 카드
============================== */

.list-section {
    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 24px;
    min-height: 180px;

    /* 카드 그림자 */
    box-shadow: 0 6px 20px rgba(180, 120, 70, 0.08);
}


/* ==============================
   6. 제목
============================== */

h2 {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 25px;
    color: #D97835;
}


/* ==============================
   7. 입력 항목
============================== */

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: bold;
    color: #55473D;
}


/* 입력칸과 선택칸 */

input,
select {
    width: 100%;
    height: 52px;
    padding: 12px;

    border: 1px solid #F0DFD0;
    border-radius: 14px;

    background-color: #FFFAF6;
    color: #3D352F;

    font-size: 15px;

    transition: border-color 0.2s, box-shadow 0.2s;
}


/* 입력칸 선택 시 */

input:focus,
select:focus {
    outline: none;
    border-color: #E58A45;
    box-shadow: 0 0 0 3px rgba(229, 138, 69, 0.12);
}


/* ==============================
   8. 추가 버튼
============================== */

#add-btn {
    width: 100%;
    height: 55px;

    border: none;
    border-radius: 14px;

    background-color: #65A876;
    color: #FFFFFF;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition: background-color 0.2s, transform 0.2s;
}


/* 마우스를 올렸을 때 */

#add-btn:hover {
    background-color: #4E9460;
}


/* 버튼 클릭 시 */

#add-btn:active {
    transform: scale(0.98);
}


/* ==============================
   9. 내역 목록
============================== */

#list-area {
    min-height: 80px;
}


/* 내역이 없을 때 */

.empty-message {
    text-align: center;
    color: #B5A69A;
    padding: 35px 10px;
}


/* ==============================
   10. 표
============================== */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.transaction-table th,
.transaction-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #F3E8DF;
    text-align: center;
    white-space: nowrap;
}


/* 표 제목 */

.transaction-table th {
    background-color: #FFF7F0;
    color: #A87550;
    font-weight: bold;
}


/* 금액 */

.transaction-table td.amount {
    text-align: right;
    font-weight: bold;
}


/* 지출 색상 - 빨강 */

.expense-text {
    color: #E05252;
}


/* 수입 색상 - 파랑 */

.income-text {
    color: #3182CE;
}


/* ==============================
   11. 모바일 화면
============================== */

@media (max-width: 480px) {

    body {
        padding: 20px 15px;
    }

    header h1 {
        font-size: 34px;
    }

    .input-section,
    .list-section {
        padding: 22px;
        border-radius: 20px;
    }

    h2 {
        font-size: 20px;
    }

    input,
    select {
        height: 48px;
    }

    #add-btn {
        height: 50px;
    }

    .transaction-table {
        font-size: 12px;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 10px 6px;
    }
}