:root {
  --bg: #fff8fb;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #666;
  --line: #e8d8f0;
  --brand:  #ff4fa3;
  --brand2: #5b4fff;
  --accent: #ffca3a;
  --green:  #2ecc71;
  --orange: #ff7f3f;
  --teal:   #00c9c8;
  --success: #1f9d55;
  --danger: #cf2e2e;
  --shadow: 0 8px 28px rgba(91,79,255,.13);
  --shadow-card: 0 6px 22px rgba(255,79,163,.12);
  --r: 20px;
  --r-sm: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', 'Segoe UI', Arial, sans-serif;
  background: #fff8fb;
  color: var(--text);
  /* subtle confetti-dot background */
  background-image:
    radial-gradient(circle, #ffd6ec 1px, transparent 1px),
    radial-gradient(circle, #d6eaff 1px, transparent 1px),
    radial-gradient(circle, #fff0b3 1px, transparent 1px);
  background-size: 40px 40px, 60px 60px, 80px 80px;
  background-position: 0 0, 20px 20px, 10px 40px;
}

a { color: inherit; text-decoration: none; }

.wrap { width: min(1100px, calc(100% - 24px)); margin: 0 auto; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--line);
  z-index: 10;
  box-shadow: 0 3px 16px rgba(255,79,163,.10);
}
.topbar__inner {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 0; gap: 12px;
}
.brand {
  font-weight: 900;
  font-size: 1.4rem;
  background: linear-gradient(90deg, var(--brand2), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav a {
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 700;
  transition: background .15s, color .15s;
}
.nav a:hover { background: #efe9ff; color: var(--brand2); }

.main { padding: 22px 0 40px; }

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  background: linear-gradient(135deg, #fff5fe 0%, #eaf0ff 50%, #fff9e0 100%);
  padding: 32px 28px;
  border: 2px solid #e0d0ff;
  border-radius: 28px;
  box-shadow: 0 12px 40px rgba(91,79,255,.12);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '🎈🏰🎠🌈🎡';
  position: absolute;
  top: 12px; right: 16px;
  font-size: 1.6rem;
  letter-spacing: 4px;
  opacity: .55;
  pointer-events: none;
}
.hero h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 52px);
  line-height: 1.1;
  background: linear-gradient(90deg, var(--brand2) 0%, var(--brand) 55%, var(--orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
}
.hero p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* ── Searchbar ── */
.searchbar {
  background: #fff;
  border: 2px solid #e0d0ff;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* ── Grid ── */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ── Cards ── */
.card, .form-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  padding: 16px;
  transition: transform .18s, box-shadow .18s;
}
.card:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  box-shadow: 0 16px 40px rgba(255,79,163,.18);
}

/* rainbow card top border cycle */
.card:nth-child(4n+1) { border-top: 4px solid var(--brand); }
.card:nth-child(4n+2) { border-top: 4px solid var(--brand2); }
.card:nth-child(4n+3) { border-top: 4px solid var(--accent); }
.card:nth-child(4n+4) { border-top: 4px solid var(--teal); }

.card__image {
  height: 180px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 62px;
}
/* colorful card image backgrounds per position */
.card:nth-child(4n+1) .card__image { background: linear-gradient(135deg, #ffe7f4, #ffd6ec); }
.card:nth-child(4n+2) .card__image { background: linear-gradient(135deg, #e0d9ff, #d0e8ff); }
.card:nth-child(4n+3) .card__image { background: linear-gradient(135deg, #fff9cc, #ffe8b0); }
.card:nth-child(4n+4) .card__image { background: linear-gradient(135deg, #ccf5f5, #b0e8f0); }

.card__title { font-size: 1.1rem; font-weight: 900; margin: 12px 0 8px; }
.card__meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .93rem; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .82rem;
}
/* cycle badge colors */
.list-inline .badge:nth-child(odd)  { background: #fff4b8; color: #7a5a00; }
.list-inline .badge:nth-child(even) { background: #ffe0f4; color: #a0006a; }
/* hero badge */
.hero .badge { background: linear-gradient(90deg,#ffe0f4,#e8e0ff); color: var(--brand2); }
/* section-title badge */
.section-title .badge { background: #e8e0ff; color: var(--brand2); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand2), var(--brand));
  color: #fff;
  font-weight: 900;
  font-size: .97rem;
  cursor: pointer;
  transition: filter .15s, transform .12s;
  box-shadow: 0 4px 14px rgba(91,79,255,.25);
  font-family: inherit;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn--alt { background: linear-gradient(135deg, var(--orange), var(--brand)); }
.btn--ghost { background: #f0ebff; color: var(--brand2); box-shadow: none; }
.btn--ghost:hover { background: #e4dcff; }
.btn--sm { padding: 9px 14px; border-radius: 12px; font-size: .9rem; }
.btn--full { width: 100%; }
.btn--green { background: linear-gradient(135deg, #2ecc71, #00c9c8); }
.btn--danger { background: linear-gradient(135deg, #ff5f5f, #cf2e2e); }

/* ── Inputs ── */
.input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand2);
  box-shadow: 0 0 0 3px rgba(91,79,255,.13);
}
label { display: grid; gap: 6px; font-weight: 800; font-size: .95rem; }

/* ── Section Title ── */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 30px 0 16px;
}
.section-title h2 {
  margin: 0;
  font-weight: 900;
  font-size: 1.5rem;
  background: linear-gradient(90deg, var(--brand2), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Footer ── */
.footer {
  border-top: 2px solid var(--line);
  padding: 24px 0 40px;
  background: linear-gradient(180deg, rgba(255,255,255,.7), #f8f0ff);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .9rem;
}

/* ── Flash Messages ── */
.flash { padding: 14px 16px; border-radius: 16px; margin-bottom: 14px; font-weight: 800; border: 2px solid transparent; }
.flash--success { background: #e6fff2; color: #146c3b; border-color: #a3e6c5; }
.flash--error   { background: #fff0f0; color: #a42121; border-color: #f8b0b0; }
.flash--info    { background: #eef5ff; color: #295ea9; border-color: #b0ccf8; }

/* ── KPIs ── */
.kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.kpi {
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: var(--shadow-card);
}
.kpi:nth-child(1) { border-top: 4px solid var(--brand); }
.kpi:nth-child(2) { border-top: 4px solid var(--brand2); }
.kpi:nth-child(3) { border-top: 4px solid var(--accent); }
.kpi strong { display: block; font-size: 1.6rem; font-weight: 900; }

/* ── Table ── */
.table { width: 100%; border-collapse: collapse; }
.table th { background: linear-gradient(90deg,#f5f0ff,#fff4f9); }
.table th, .table td { padding: 12px; border-bottom: 2px solid var(--line); text-align: left; vertical-align: top; }

/* ── Misc ── */
.small { font-size: .88rem; color: var(--muted); }
.list-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.pricebox { position: sticky; top: 90px; }
.checkbox-list { display: grid; gap: 10px; }
.muted { color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 720px) {
  .kpis { grid-template-columns: 1fr; }
  .topbar__inner { align-items: flex-start; flex-direction: column; }
  .nav { width: 100%; }
  .hero { padding: 22px 18px; }
  .hero::before { display: none; }
}
