* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Malgun Gothic", "맑은 고딕", -apple-system, sans-serif;
  background: #f4f5f7;
  color: #222;
  padding-bottom: 40px;
}

header {
  background: #2b6cb0;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  font-size: 17px;
  margin: 0;
}

header button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card h2 {
  font-size: 15px;
  margin: 0 0 12px;
  color: #2b6cb0;
}

label {
  display: block;
  font-size: 13px;
  color: #555;
  margin: 10px 0 4px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
}

input[type="file"] {
  width: 100%;
  padding: 8px 0;
}

button.primary {
  width: 100%;
  padding: 13px;
  margin-top: 16px;
  background: #2b6cb0;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
}

button.secondary {
  background: #e2e8f0;
  color: #333;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}

button.danger {
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}

.expense-item {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.expense-item:last-child { border-bottom: none; }

.expense-main { flex: 1; min-width: 0; }
.expense-main .top-row { font-size: 14px; font-weight: bold; }
.expense-main .sub-row { font-size: 12px; color: #777; margin-top: 2px; }
.expense-actions { display: flex; gap: 6px; flex-shrink: 0; }

.thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
  flex-shrink: 0;
}

.month-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.month-filter select { flex: 1; }

.photo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  border: 2px dashed #b9c6d6;
  border-radius: 10px;
  background: #f0f4f8;
  color: #6b7a8f;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 4px;
  overflow: hidden;
}
.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.button-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.button-row button {
  flex: 1;
  margin-top: 0;
}

.error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 8px;
}

.hint {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.total-row {
  text-align: right;
  font-weight: bold;
  font-size: 14px;
  padding-top: 8px;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.admin-table th, table.admin-table td {
  border: 1px solid #e2e2e2;
  padding: 6px 8px;
  text-align: center;
}
table.admin-table th { background: #f0f4f8; }

.hidden { display: none !important; }
