@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Archivo+Black&display=swap');

:root {
  --violet: #6f39b4;
  --violet-dark: #4c247e;
  --violet-soft: #efe2ff;
  --sand: #f7edd2;
  --forest: #3f6a30;
  --forest-dark: #2d4a24;
  --amber: #f0c76a;
  --ink: #1f2330;
  --line: #d9c9ef;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: "Barlow", "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  line-height: 1.45;
  background:
    radial-gradient(circle at 10% 8%, rgba(111,57,180,.28), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(240,199,106,.24), transparent 30%),
    linear-gradient(160deg, #faf5e7 0%, #f2e9ff 54%, #e5f0d4 100%);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--violet-dark);
  font-family: "Archivo Black", "Barlow", sans-serif;
  font-weight: 400;
  font-size: 1.05rem;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(111,57,180,.35);
  background: #fff;
  padding: 5px;
}

nav a { margin-left: 8px; }
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
nav a { margin-left: 0; }

.hero {
  border-radius: 26px;
  padding: 24px;
  color: #fff;
  margin-bottom: 18px;
  background:
    linear-gradient(136deg, rgba(43,70,34,.96), rgba(67,110,52,.95) 36%, rgba(103,57,167,.96) 80%);
  box-shadow: 0 20px 35px rgba(76,36,126,.23);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.2fr .9fr;
    gap: 22px;
  }
}

.badge {
  display: inline-flex;
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}

.hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 4.3vw, 2.75rem);
  line-height: 1.08;
}

.hero p { margin: 0 0 10px; font-size: 1.05rem; }

.hero-image {
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.34);
  box-shadow: 0 18px 28px rgba(25, 19, 44, .33);
  min-height: 220px;
}

.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-main {
  background: linear-gradient(130deg, #ffd57e, #efbf55);
  color: #3d2b17;
}

.card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(110, 70, 170, .23);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 18px rgba(85, 58, 122, 0.08);
}

.card h1, .card h2, .card h3 {
  margin-top: 0;
  color: var(--violet-dark);
  font-family: "Archivo Black", "Barlow", sans-serif;
  font-weight: 400;
  letter-spacing: .01em;
}
.card h1 { font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.15; }
.card h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.2; }
.card h3 { font-size: 1.08rem; line-height: 1.25; }
.card p, .card li { font-size: 1rem; }

.card-alt {
  background: linear-gradient(160deg, rgba(255,250,236,.95), rgba(248,235,201,.9));
  border-color: rgba(165,120,43,.25);
}

.group-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 850px) {
  .group-showcase { grid-template-columns: 1.1fr .9fr; }
}

.group-showcase .photo-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(111,57,180,.2);
}

.group-showcase .photo-frame img {
  width: 100%;
  display: block;
  object-fit: cover;
  min-height: 230px;
  max-height: 330px;
}

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

@media (min-width: 800px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 2fr 1fr 1fr; }
}

label {
  font-size: 14px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  color: #3f2b63;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
  font-size: 15px;
  background: #fff;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 86px;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(111,57,180,.25);
  border-color: var(--violet);
}

a.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  padding: 10px 14px;
  min-height: 42px;
  margin: 0;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.15;
  appearance: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

a.button:hover, button:hover {
  transform: translateY(-1px);
}

.button-primary, button.primary {
  background: linear-gradient(130deg, var(--violet), #8f5cd3);
  color: #fff;
  box-shadow: 0 8px 18px rgba(111,57,180,.25);
}

.button-secondary, button.secondary {
  background: #fff;
  color: var(--violet-dark);
  border: 1px solid rgba(110, 70, 170, .35);
}

.note {
  border-radius: 14px;
  border: 1px solid rgba(165,120,43,.3);
  background: rgba(255,248,227,.9);
  padding: 13px;
}

.help { font-size: 13px; color: #555; }
.error { color: #b3261e; font-size: 13px; margin: 5px 0 0; }
.success { color: #125f3d; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid #ece4f9; vertical-align: top; }
th { color: #4d3971; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; }

.status-pill {
  display: inline-block;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet-dark);
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill--paid {
  background: rgba(30, 132, 73, .14);
  color: #145b32;
}

.status-pill--pending {
  background: rgba(154, 111, 22, .14);
  color: #8f5a05;
}

.status-pill--cancelled {
  background: rgba(179, 38, 30, .14);
  color: #8a2019;
}

.status-pill--delivered {
  background: rgba(32, 127, 154, .16);
  color: #17596f;
}

.status-pill--delivery-pending {
  background: rgba(77, 57, 113, .14);
  color: #4d3971;
}

.stats-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .stats-grid { grid-template-columns: repeat(5, 1fr); }
}

.stat-card {
  border: 1px solid rgba(110, 70, 170, .24);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  padding: 12px;
}

.stat-card .k {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #5a4187;
}

.stat-card .v {
  font-size: 24px;
  font-weight: 800;
  color: var(--violet-dark);
  margin-top: 2px;
}

.goal-widget {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(110, 70, 170, .24);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(242,234,255,.86));
}

.goal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.goal-top .k {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #5a4187;
}

.goal-top .v {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 800;
  color: var(--violet-dark);
}

.goal-right {
  text-align: right;
}

.goal-right .help {
  margin: 6px 0 0;
}

.goal-track {
  margin-top: 10px;
  height: 12px;
  border-radius: 999px;
  background: rgba(77, 57, 113, .16);
  overflow: hidden;
}

.goal-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f8f69, #6f39b4);
}

.actions-cell {
  min-width: 260px;
}

.actions {
  display: grid;
  gap: 8px;
}

.actions .row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.actions .row form {
  margin: 0;
}

.action-btn {
  width: 100%;
  text-align: center;
  white-space: normal;
  line-height: 1.2;
  word-break: break-word;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
}

.action-btn-main {
  font-weight: 800;
}

.action-btn-muted {
  background: #f8f4ff;
  border: 1px solid rgba(110, 70, 170, .28);
  color: #4b2c7f;
}

.action-btn-muted:hover {
  background: #efe7ff;
}

@media (min-width: 900px) {
  .actions .row {
    grid-template-columns: 1fr;
  }
}

.receipt-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.photo-gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 850px) {
  .photo-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-item {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(110, 70, 170, .25);
  background: #fff;
}

.gallery-item img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: 9px 10px;
  font-size: 13px;
  color: #4d3971;
  font-weight: 700;
}

.gallery-crop-a { object-position: 35% center; }
.gallery-crop-b { object-position: 75% center; }

@media print {
  body {
    background: #fff;
  }
  .topbar,
  .print-hide {
    display: none !important;
  }
  .card {
    box-shadow: none;
    border-color: #bbb;
  }
  .print-receipt {
    border: 1px solid #444;
    background: #fff;
  }
}
