
/* =========================
   기본 설정
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans KR", Arial, sans-serif;
  background-color: #f0f8ff;
  color: #334155;
  padding: 40px 20px;
}

/* 전체 컨테이너 */
.container {
  max-width: 800px;
  margin: 0 auto;
}

/* =========================
   헤더
========================= */
.header {
  text-align: center;
  margin-bottom: 35px;
}

.header h1 {
  font-size: 34px;
  font-weight: 800;
  color: #2196d2;
  margin-bottom: 8px;
}

.header p {
  font-size: 14px;
  color: #78909c;
}

/* =========================
   카드 공통 디자인
========================= */
.input-section,
.list-section {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 5px 20px rgba(70, 150, 200, 0.08);
  margin-bottom: 25px;
  border: 1px solid #e6f2f9;
}

h2 {
  font-size: 21px;
  font-weight: 700;
  color: #263b50;
  margin-bottom: 25px;
}

/* =========================
   입력 폼
========================= */
.input-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #526779;
}

.form-group input,
.form-group select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #dceaf3;
  border-radius: 10px;
  background-color: #fafdff;
  font-size: 15px;
  color: #334155;
  outline: none;
  transition: 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #55b8e8;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(85, 184, 232, 0.12);
}

/* =========================
   추가 버튼
========================= */
.add-button {
  width: 100%;
  height: 52px;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  background-color: #349ed6;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.add-button:hover {
  background-color: #2185bd;
}

.add-button:active {
  transform: scale(0.99);
}

/* =========================
   내역 목록
========================= */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

thead {
  background-color: #edf8fe;
}

th {
  padding: 16px 10px;
  color: #456477;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

td {
  padding: 16px 10px;
  border-bottom: 1px solid #edf2f5;
  color: #475569;
  font-size: 14px;
  white-space: nowrap;
}

/* 수입: 빨간색 */
.income {
  color: #e74c3c;
  font-weight: 700;
}

/* 지출: 파란색 */
.expense {
  color: #2878d0;
  font-weight: 700;
}

/* =========================
   빈 목록 안내
========================= */
.empty-list {
  min-height: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px dashed #cbdfea;
  border-radius: 12px;
  background-color: #fafdff;
  margin-top: 12px;
}

.empty-list p {
  font-size: 14px;
  color: #94a9b8;
}

/* =========================
   하단
========================= */
footer {
  text-align: center;
  padding: 15px;
  color: #9aabb8;
  font-size: 12px;
}

/* =========================
   모바일 반응형
========================= */
@media (max-width: 480px) {
  body {
    padding: 25px 14px;
  }

  .header h1 {
    font-size: 29px;
  }

  .input-section,
  .list-section {
    padding: 22px 16px;
    border-radius: 14px;
  }

  h2 {
    font-size: 19px;
  }

  th,
  td {
    padding: 13px 7px;
    font-size: 12px;
  }
}
