/* 공통,로그인 디자인 */
* {
  box-sizing: border-box;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #eafff3, #ffffff);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.app-wrapper {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  min-height: 100vh;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
}

.top-bar {
  position: relative;
  height: 56px;
}

.logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo img {
  height: 34px;
}

.content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 20px;
}

.login-box {
  width: 100%;
  text-align: center;
}

.login-box h1 {
  margin-bottom: 32px;
  color: #1f2937;
}

.login-box input {
  width: 100%;
  height: 48px;
  margin-bottom: 14px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-box input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.login-box button {
  width: 100%;
  height: 48px;
  background: #22c55e;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s, transform 0.1s, box-shadow 0.1s;
  box-shadow: 0 6px 14px rgba(34, 197, 94, 0.25);
}

.login-box button:hover {
  background: #16a34a;
}

.login-box button:active {
  background: #15803d;
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.2);
}

.copyright {
  margin-top: 18px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

/* index 디자인 */

.action-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
}

.action-bar button {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #22c55e;
  background: #ffffff;
  color: #16a34a;
  font-size: 13px;
  cursor: pointer;
}

.action-bar button.primary {
  background: #22c55e;
  color: #fff;
  border: none;
}
.tab:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.tab.active {
  background: #ecfdf5;
  border-color: #22c55e;
  color: #16a34a;
}
/*캘린더*/
.calendar-box {
  margin: 10px 16px;
  padding: 16px;
  background: #f0fdf4;
  border-radius: 18px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-header button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #16a34a;
}

.ym-select {
  display: flex;
  gap: 6px;
}

.ym-select select {
  border: 1px solid #d1fae5;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
  background: #ffffff;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.day {
  height: 36px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  background: #ffffff;
}

.day:hover {
  background: #dcfce7;
}

.day.today {
  border: 1px solid #22c55e;
}

.day.active {
  background: #22c55e;
  color: #ffffff;
}

.day.empty {
  background: transparent;
  cursor: default;
}

/*월 통계*/
.summary-box {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 0PX 16px;
}

.summary-item {
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 10px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
}


.summary-box .label {
  font-size: 11px;
  color: #9ca3af;
}

.summary-box .value {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
}

.summary-item.income .value { color: #16a34a; }
.summary-item.expense .value { color: #dc2626; }
.summary-item.saving .value { color: #2563eb; }
.summary-item.total .value { color: #065f46; }

/*내역 리스트*/
.list-box {
  padding: 8px 16px 16px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.daily-summary {
  align-items: center;
  justify-self: center;
  margin-top: 4px;
  padding-left: 4px;
  font-size: 12px;
  color: #6b7280;
}

.daily-summary .income {
  color: #16a34a;
  font-weight: 600;
}

.daily-summary .expense {
  color: #dc2626;
  font-weight: 600;
}

.daily-summary .total {
  color: #065f46;
  font-weight: 600;
}

.daily-summary .divider {
  margin: 0 6px;
  color: #d1d5db;
}
.list-item .left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.category-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.text .top {
  display: flex;
  gap: 8px;
  align-items: center;
}

.category {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.time {
  font-size: 11px;
  color: #9ca3af;
}

.memo {
  font-size: 12px;
  color: #6b7280;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amount {
  font-size: 15px;
  font-weight: 700;
}

.list-item.expense .amount { color: #ef4444; }
.list-item.income .amount { color: #22c55e; }

.list-header {
  padding: 10px 16px 2px;
}

#selectedDateText {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  padding-left: 4px; 
}

.percent-bar-wrap {
  position: relative;
  margin: 12px 0;
}

.total-amount {
  left: 0;
  font-size: 23px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #000000; 
}

.percent-bar {
  display: flex;
  width: 100%;
  height: 24px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
  margin-bottom: 12px;
}

.percent-bar .segment {
  height: 100%;
  width: calc(var(--p) * 1%);
}

 .food {
  background: #22c55e; 
}

 .transport {
  background: #60a5fa; 
}

.shopping {
  background: #f59e0b; 
}

.stat-card {
  padding: 12px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
}

.stat-header {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.stat-title {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
}

.stat-title.active {
  background: #ecfdf5;
  color: #16a34a;
}

.type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.type-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 0;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.type-card .emoji {
  font-size: 20px;
  display: block;
}

.type-card .label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  color: #374151;
}

.type-card.active {
  border-color: #22c55e;
  background: #ecfdf5;
}

.type-card.active .label {
  color: #16a34a;
}.select-box {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

.select-box select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.select-box select:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.15);
}

.select-box .arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 14px;
  color: #6b7280;
}



.list-item .right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-btn {
  border: none;
  background: #f3f4f6;
  color: #9ca3af;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.delete-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}