:root {
  --cream: #fbf7ef;
  --paper: #fffdf8;
  --ink: #24332b;
  --muted: #6b756f;
  --green: #1f6b45;
  --green-dark: #154d32;
  --red: #a83232;
  --red-dark: #7d2424;
  --gold: #c79a32;
  --border: #e5ded0;
  --shadow: 0 14px 40px rgb(36 51 43 / 9%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgb(199 154 50 / 10%), transparent 28rem),
    radial-gradient(circle at 100% 20%, rgb(31 107 69 / 8%), transparent 30rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: var(--green); }
a:hover { color: var(--green-dark); }

h1, h2, h3 { line-height: 1.15; }
h1 { margin: 0 0 0.65rem; font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.04em; }
h2 { margin: 0 0 0.5rem; }
p { margin-top: 0; }

.site-header {
  height: 0.4rem;
  background: linear-gradient(90deg, var(--green) 0 45%, var(--gold) 45% 55%, var(--red) 55%);
}

main { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; padding: 4rem 0 5rem; }
.card { padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid var(--border); border-radius: 1rem; background: var(--paper); box-shadow: var(--shadow); }
.narrow-card { width: min(34rem, 100%); margin: 3rem auto; }
.wish-list-card { width: min(46rem, 100%); margin: 1rem auto; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 0.4rem; color: var(--red); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.stack { display: grid; gap: 1.25rem; margin-top: 1.75rem; }

.field { display: grid; gap: 0.45rem; }
.field label { font-weight: 700; }
input, textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid #cfc7b9;
  border-radius: 0.55rem;
  color: var(--ink);
  background: white;
  font: inherit;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 3px solid rgb(31 107 69 / 15%); border-color: var(--green); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease;
}
.button:hover { transform: translateY(-1px); text-decoration: none; }
.button-primary { color: white; background: var(--green); }
.button-primary:hover { color: white; background: var(--green-dark); }
.button-secondary { color: var(--ink); border-color: var(--border); background: white; }
.button-secondary:hover { color: var(--ink); background: #f6f1e8; }
.button-danger { color: white; background: var(--red); }
.button-danger:hover { color: white; background: var(--red-dark); }
.button:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

.flash, .status-banner { margin-bottom: 1.25rem; padding: 0.9rem 1rem; border-radius: 0.65rem; }
.flash-notice, .status-banner.success { color: #174e34; border: 1px solid #aad3bd; background: #eaf7ef; }
.flash-alert, .error-box { color: #742525; border: 1px solid #e5b5b5; background: #fff0f0; }
.error-box { padding: 0.85rem 1rem; border-radius: 0.6rem; }
.error-box ul { margin-bottom: 0; }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.9rem 0.7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.actions { text-align: right; }
.badge { display: inline-block; padding: 0.25rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 750; }
.badge-success { color: #155336; background: #dff3e7; }
.badge-warning { color: #784d08; background: #fff0c7; }
.badge-neutral { color: #365343; background: #e8eee9; }
.badge-muted { color: #666; background: #eee; }
.admin-actions { display: grid; gap: 1rem; margin-top: 1rem; }
.action-card { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.action-card p { margin-bottom: 0; color: var(--muted); }
.empty-icon { margin: 0; font-size: 2.5rem; }
.empty-icon, .empty-icon ~ * { text-align: center; }
.saved-note { margin: 1.5rem 0 0; color: var(--green); font-weight: 650; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 700px) {
  main { padding-top: 2rem; }
  .page-heading, .action-card { align-items: stretch; flex-direction: column; }
  .action-card .button { width: 100%; }
}
