:root {
  --bg: #f6f7f8;
  --card: #ffffff;
  --line: #e9edf1;
  --text: #14171a;
  --sub: #6d7783;
  --red: #f05454;
  --green: #15a57f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
}

.page {
  max-width: 1140px;
  margin: 28px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
}

.sidebar,
.content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.sidebar {
  padding: 16px;
  position: sticky;
  top: 14px;
  height: fit-content;
}

.brand {
  margin: 4px 0 18px;
  font-size: 24px;
  line-height: 1.2;
}

.menu-group {
  margin-bottom: 18px;
}

.menu-group-title {
  margin: 0 0 10px;
  color: var(--sub);
  font-size: 13px;
  font-weight: 700;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  margin-bottom: 8px;
  font-size: 14px;
  background: #fff;
}

.menu-item.active {
  border-color: #f8c9c9;
  background: #fff7f7;
}

.content {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.hero {
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
}

.hero-sub {
  font-size: 13px;
  color: var(--sub);
}

.hero-title {
  margin-top: 6px;
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 900;
}

#totalMoney {
  color: #d03636;
}

.hero-button {
  margin-top: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

.event {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.event-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.event h3 {
  margin: 0;
  font-size: 17px;
}

.event p {
  margin: 4px 0 0;
  color: var(--sub);
  font-size: 13px;
}

.event-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f4f7fb;
  display: grid;
  place-items: center;
}

.amount {
  color: #d03636;
  font-size: 20px;
  white-space: nowrap;
}

.amount.green {
  color: var(--green);
}

.list-card {
  padding: 14px;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.list-head h3 {
  margin: 0;
  font-size: 18px;
}

.list-head strong {
  color: #d03636;
  font-size: 14px;
}

.app-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.app-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #edf2f7;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.drawer {
  padding: 14px;
  display: none;
}

.drawer.open {
  display: block;
}

.drawer strong {
  display: block;
  margin-bottom: 6px;
}

.drawer ul {
  margin: 0;
  padding-left: 18px;
  color: var(--sub);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 620px) {
  .event {
    align-items: flex-start;
    flex-direction: column;
  }

  .amount {
    font-size: 18px;
  }
}
