@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap");


:root {
  --background: #fff7fb;
  --background-soft: #fff0f6;

  --card: rgba(255, 255, 255, 0.84);
  --card-border: rgba(236, 72, 153, 0.14);

  --primary: #ec4899;
  --primary-dark: #db2777;
  --primary-soft: #fce7f3;

  --danger: #e11d48;
  --danger-soft: #fff1f2;

  --text: #3f2b35;
  --text-muted: #8d6b7b;

  --white: #ffffff;

  --shadow:
    0 18px 50px rgba(190, 24, 93, 0.08);
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


html {
  scroll-behavior: smooth;
}


body {
  min-height: 100vh;

  font-family: "DM Sans", sans-serif;

  background:
    radial-gradient(
      circle at top left,
      rgba(244, 114, 182, 0.16),
      transparent 32%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(251, 207, 232, 0.6),
      transparent 34%
    ),
    var(--background);

  color: var(--text);
}


button,
input {
  font: inherit;
}


button {
  border: none;
}


.app {
  width: min(100% - 32px, 900px);

  margin: 0 auto;

  padding:
    72px
    0
    32px;
}


/* HERO */

.hero {
  text-align: center;
  margin-bottom: 42px;
}


.hero-badge,
.section-kicker {
  display: inline-block;

  color: var(--primary-dark);

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 1.5px;
  text-transform: uppercase;
}


.hero-badge {
  padding: 8px 14px;
  margin-bottom: 18px;

  background: var(--primary-soft);

  border: 1px solid rgba(236, 72, 153, 0.16);

  border-radius: 999px;
}


.hero h1 {
  font-family: "Playfair Display", serif;

  font-size: clamp(42px, 8vw, 68px);

  line-height: 1;

  margin-bottom: 18px;

  color: #4b2d3c;
}


.hero p {
  max-width: 520px;

  margin: 0 auto;

  color: var(--text-muted);

  font-size: 16px;
  line-height: 1.7;
}


/* CARD */

.card {
  padding: 32px;
  margin-bottom: 22px;

  background: var(--card);

  border: 1px solid var(--card-border);

  border-radius: 28px;

  box-shadow: var(--shadow);

  backdrop-filter: blur(18px);
}


.section-heading {
  margin-bottom: 26px;
}


.section-heading h2,
.result-top h2,
.history-header h2 {
  margin-top: 7px;

  font-size: 25px;

  letter-spacing: -0.5px;
}


.section-heading p {
  margin-top: 7px;

  color: var(--text-muted);

  line-height: 1.6;
}


/* FORM */

.form-grid,
.deposit-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;
}


.input-group {
  display: flex;
  flex-direction: column;

  gap: 9px;
}


.input-group label {
  font-size: 14px;
  font-weight: 600;
}


.optional {
  margin-left: 4px;

  color: var(--text-muted);

  font-size: 12px;
  font-weight: 400;
}


.input-wrapper {
  display: flex;
  align-items: center;

  min-height: 52px;

  background: var(--white);

  border:
    1px solid
    rgba(109, 40, 73, 0.12);

  border-radius: 15px;

  overflow: hidden;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


.input-wrapper:focus-within {
  border-color:
    rgba(236, 72, 153, 0.55);

  box-shadow:
    0 0 0 4px
    rgba(236, 72, 153, 0.08);
}


.prefix {
  padding-left: 16px;

  color: var(--primary-dark);

  font-weight: 700;
}


.input-wrapper input {
  width: 100%;

  min-width: 0;

  padding:
    15px 16px 15px 8px;

  border: none;
  outline: none;

  background: transparent;

  color: var(--text);
}


.input-wrapper input::placeholder,
.normal-input::placeholder {
  color: #c2a6b3;
}


.date-input,
.normal-input {
  width: 100%;

  min-height: 52px;

  padding: 0 15px;

  background: var(--white);

  border:
    1px solid
    rgba(109, 40, 73, 0.12);

  border-radius: 15px;

  outline: none;

  color: var(--text);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


.date-input:focus,
.normal-input:focus {
  border-color:
    rgba(236, 72, 153, 0.55);

  box-shadow:
    0 0 0 4px
    rgba(236, 72, 153, 0.08);
}


.note-group {
  margin-top: 18px;
}


/* BUTTON */

.primary-btn,
.secondary-btn,
.danger-btn {
  min-height: 50px;

  padding: 14px 20px;

  border-radius: 15px;

  font-weight: 700;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}


.primary-btn {
  width: 100%;

  margin-top: 24px;

  background:
    linear-gradient(
      135deg,
      var(--primary),
      var(--primary-dark)
    );

  color: var(--white);

  box-shadow:
    0 14px 28px
    rgba(219, 39, 119, 0.18);
}


.primary-btn:hover {
  transform: translateY(-2px);

  box-shadow:
    0 18px 32px
    rgba(219, 39, 119, 0.24);
}


.secondary-btn {
  background: var(--primary-soft);

  color: var(--primary-dark);

  border:
    1px solid
    rgba(236, 72, 153, 0.14);
}


.secondary-btn:hover {
  transform: translateY(-2px);

  background: #fbdbea;
}


.danger-btn {
  background: var(--danger-soft);

  color: var(--danger);

  border:
    1px solid
    rgba(225, 29, 72, 0.12);
}


.danger-btn:hover {
  transform: translateY(-2px);

  background: #ffe4e6;
}


/* PROGRESS */

.result-top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 22px;
}


.progress-percent {
  display: grid;

  place-items: center;

  min-width: 72px;
  height: 44px;

  padding: 0 14px;

  background: var(--primary-soft);

  color: var(--primary-dark);

  border-radius: 999px;

  font-weight: 700;
}


.progress-track {
  width: 100%;
  height: 12px;

  margin-bottom: 26px;

  background: #f6dce8;

  border-radius: 999px;

  overflow: hidden;
}


.progress-bar {
  height: 100%;

  background:
    linear-gradient(
      90deg,
      #f472b6,
      #ec4899
    );

  border-radius: inherit;

  transition: width 0.6s ease;
}


.stats-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 14px;
}


.stat-item {
  padding: 18px;

  background:
    rgba(255, 247, 251, 0.75);

  border:
    1px solid
    rgba(236, 72, 153, 0.08);

  border-radius: 18px;
}


.stat-item span {
  display: block;

  margin-bottom: 6px;

  color: var(--text-muted);

  font-size: 13px;
}


.stat-item strong {
  display: block;

  font-size: 18px;

  word-break: break-word;
}


.highlight-stat {
  background:
    linear-gradient(
      135deg,
      rgba(252, 231, 243, 0.85),
      rgba(255, 247, 251, 0.9)
    );

  border-color:
    rgba(236, 72, 153, 0.16);
}


.highlight-stat strong {
  color: var(--primary-dark);
}


.goal-message {
  margin-top: 18px;

  padding: 15px 17px;

  background: var(--primary-soft);

  color: var(--primary-dark);

  border-radius: 15px;

  font-size: 14px;
  font-weight: 600;

  line-height: 1.5;
}


/* HISTORY */

.history-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 24px;
}


.history-count {
  flex-shrink: 0;

  padding: 8px 12px;

  background: var(--primary-soft);

  color: var(--primary-dark);

  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
}


.history-list {
  display: flex;
  flex-direction: column;

  gap: 12px;
}


.empty-history {
  padding: 38px 20px;

  text-align: center;

  border:
    1px dashed
    rgba(236, 72, 153, 0.2);

  border-radius: 18px;

  background:
    rgba(255, 247, 251, 0.55);
}


.empty-icon {
  margin-bottom: 8px;

  color: var(--primary);

  font-size: 30px;
}


.empty-history strong {
  display: block;

  margin-bottom: 5px;
}


.empty-history p {
  color: var(--text-muted);

  font-size: 13px;
}


.history-item {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 18px;

  padding: 17px 18px;

  background:
    rgba(255, 247, 251, 0.7);

  border:
    1px solid
    rgba(236, 72, 153, 0.09);

  border-radius: 18px;
}


.history-info {
  min-width: 0;

  flex: 1;
}


.history-date {
  margin-bottom: 3px;

  color: var(--text-muted);

  font-size: 12px;
}


.history-amount {
  color: var(--primary-dark);

  font-size: 18px;
  font-weight: 700;
}


.history-note {
  margin-top: 5px;

  color: var(--text-muted);

  font-size: 13px;

  word-break: break-word;
}


.delete-btn {
  display: grid;

  place-items: center;

  width: 36px;
  height: 36px;

  background: var(--danger-soft);

  color: var(--danger);

  border-radius: 11px;

  cursor: pointer;

  font-size: 17px;
}


.delete-btn:hover {
  background: #ffe4e6;
}


/* DATA */

.data-actions {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 12px;
}


/* FOOTER */

footer {
  padding-top: 20px;

  text-align: center;

  color: var(--text-muted);

  font-size: 13px;
}


/* MOBILE */

@media (max-width: 650px) {

  .app {
    width:
      min(
        100% - 22px,
        900px
      );

    padding-top: 48px;
  }


  .hero {
    margin-bottom: 30px;
  }


  .card {
    padding: 22px;

    border-radius: 22px;
  }


  .form-grid,
  .deposit-grid,
  .stats-grid,
  .data-actions {
    grid-template-columns: 1fr;
  }


  .result-top,
  .history-header {
    align-items: flex-start;
  }


  .result-top h2,
  .history-header h2 {
    font-size: 21px;
  }


  .history-item {
    align-items: flex-start;
  }


  .history-amount {
    font-size: 16px;
  }

}