/* ── Reset & Variables ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink:       #f48fb1;
  --pink-dark:  #c2185b;
  --pink-light: #fce4ec;
  --lavender:   #ce93d8;
  --mint:       #a5d6a7;
  --amber:      #ffcc02;
  --gray:       #9e9e9e;
  --gray-light: #f5f5f5;
  --bg:         #fdf6f8;
  --card:       #ffffff;
  --text:       #3a3a3a;
  --text-soft:  #757575;
  --border:     #f0d6df;
  --shadow:     0 2px 12px rgba(194, 24, 91, 0.08);
  --radius:     12px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Decorative side photos (parallax) ───────────────────────────────────
   Fixed-position photos on each side of the viewport. As the user scrolls,
   JS sets --scroll-y on <html> and the transform multiplies it so the
   photos drift DOWN at a fraction of the scroll speed (parallax). Both
   bottom photos use the SAME multiplier so they stay aligned with each
   other vertically.
*/
.scroll-photo {
  position: fixed;
  width: 240px;
  height: auto;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  z-index: 2;            /* above gingham bg, below modals (z-index 100+) */
  pointer-events: none;
  opacity: 0.95;
}
/* Start BELOW the header (min-height 480px) so they don't overlap the
   hero photos at page load. Then drift down with scroll. The transform
   uses the --scroll-y custom property set by JS in app.js. */
.scroll-photo-3 { left:  1rem; top: 520px; transform: translateY(calc(var(--scroll-y, 0px) * 0.4)) rotate(-2deg); }
.scroll-photo-4 { right: 1rem; top: 520px; transform: translateY(calc(var(--scroll-y, 0px) * 0.4)) rotate(2deg); }

/* Hide on smaller screens — the page body needs the room */
@media (max-width: 1500px) {
  .scroll-photo { width: 200px; }
}
@media (max-width: 1300px) {
  .scroll-photo { display: none; }
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  /* Gingham: two overlapping translucent pink stripe layers on white.
     Where they cross, the pink stacks into a slightly deeper shade. */
  background-color: #ffffff;
  background-image:
    linear-gradient(rgba(248, 187, 208, 0.45) 50%, transparent 50%),
    linear-gradient(90deg, rgba(248, 187, 208, 0.45) 50%, transparent 50%);
  background-size: 32px 32px;
  padding: 2.25rem 1rem 1.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 480px;
  border-bottom: 1px solid #f8bbd0;
}

/* The decorative white radial circles disappear on a white background — hide them. */
body.theme-girl .site-header::before,
body.theme-girl .site-header::after {
  content: none;
}

.site-header > * { position: relative; z-index: 1; }

.its-a-girl-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #f48fb1 0%, #ec407a 100%);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(236, 64, 122, 0.25);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}
.its-a-girl-chip .chip-bow {
  font-size: 0.95rem;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}

body.theme-girl .site-header h1::before {
  content: '🎀 ';
  font-size: 0.75em;
  vertical-align: middle;
  margin-right: 0.2em;
  filter: drop-shadow(0 2px 3px rgba(194, 24, 91, 0.2));
}

/* Header photos (flank the title on desktop) */
.hero-photo {
  position: absolute;
  box-shadow: 0 12px 36px rgba(0,0,0,0.25);
  border-radius: 6px;
  z-index: 1;
  transition: transform 0.3s ease;
  object-fit: cover;
}
.hero-photo-left {
  top: -1rem;
  left: 0.5rem;
  width: 380px;
  height: 620px;
  object-position: center center;
  transform: rotate(-4deg);
}
.hero-photo-right {
  top: -1rem;
  right: 0.5rem;
  width: 380px;
  height: 620px;
  object-position: center 40%;
  transform: rotate(3deg);
}
.hero-photo:hover { transform: rotate(0deg) scale(1.02); }

@media (max-width: 1300px) {
  .hero-photo-left  { width: 300px; height: 490px; }
  .hero-photo-right { width: 300px; height: 490px; }
}
@media (max-width: 1050px) {
  .hero-photo-left  { width: 220px; height: 360px; }
  .hero-photo-right { width: 220px; height: 360px; }
}
@media (max-width: 800px) {
  .hero-photo { display: none; }
}

.header-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9c4068;
  margin-bottom: 0.35rem;
  opacity: 0.8;
}

.site-header h1 {
  font-family: 'Allura', 'Brush Script MT', cursive;
  font-size: 5.5rem;
  font-weight: 400;
  color: var(--pink-dark);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-shadow: 0 2px 10px rgba(194, 24, 91, 0.18);
}

.site-header .subtitle {
  color: #6a1f44;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Header: Ship-to pill */
.ship-to-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.4rem 0.9rem 0.4rem 0.95rem;
  background: #fff;
  border: 1px solid #f8bbd0;
  border-radius: 999px;
  box-shadow: 0 1px 6px rgba(194, 24, 91, 0.12);
  font-size: 0.82rem;
  color: #6a1f44;
  max-width: 95%;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.ship-to-pill:hover  { background: #fff5f8; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(194, 24, 91, 0.18); }
.ship-to-pill:active { transform: translateY(0); }
.ship-to-label { font-weight: 700; white-space: nowrap; }
.ship-to-addr  { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ship-to-copy {
  background: var(--pink-dark);
  color: #fff;
  border-radius: 999px;
  padding: 0.12rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* Due-date countdown */
.due-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.82);
  border-radius: 999px;
  padding: 0.45rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #6a1f44;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
.due-countdown .due-label { color: var(--pink-dark); font-weight: 700; }
.due-countdown .due-sep   { color: #bdbdbd; }

/* Progress */
.progress-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.75);
  border-radius: 20px;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.stat-pill.needed  { color: #2e7d32; }
.stat-pill.claimed { color: #e65100; }

.progress-bar-wrap {
  max-width: 400px;
  margin: 0 auto;
  background: rgba(255,255,255,0.5);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mint), #66bb6a);
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* ── Page Body & Sidebar ─────────────────────────────────────────────────── */
.page-body {
  display: flex;
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  gap: 1.5rem;
  align-items: flex-start;
}

.sidebar {
  width: 190px;
  flex-shrink: 0;
  position: sticky;
  top: 1.25rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.15rem;
  padding-left: 0.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.price-range-display {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pink);
  text-transform: none;
  letter-spacing: 0;
}

/* Dual-handle price range slider */
.price-slider-wrap {
  position: relative;
  height: 36px;
  margin-top: 0.5rem;
}
.price-slider-wrap input[type=range] {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
  z-index: 2;
  height: 4px;
}
.price-slider-wrap input[type=range]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  pointer-events: all;
  cursor: pointer;
}
.price-slider-wrap input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  pointer-events: all;
  cursor: pointer;
}
.price-estimate-note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #888;
  font-style: italic;
}
.price-estimate-note strong {
  font-style: normal;
  color: var(--pink);
}
.price-slider-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  z-index: 1;
}
.price-slider-fill {
  position: absolute;
  height: 100%;
  background: var(--pink);
  border-radius: 2px;
}

#category-filters,
#status-filters {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-btn {
  background: var(--gray-light);
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-btn:hover { border-color: var(--pink); color: var(--pink-dark); background: var(--pink-light); }
.filter-btn.active {
  background: var(--pink-light);
  border-color: var(--pink);
  color: var(--pink-dark);
  font-weight: 600;
}

main {
  flex: 1;
  min-width: 0;
}

/* ── Main Grid ───────────────────────────────────────────────────────────── */

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.category-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
}

.category-heading h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pink-dark);
}

.category-heading hr {
  flex: 1;
  border: none;
  border-top: 1.5px solid var(--border);
}

/* ── Item Card ───────────────────────────────────────────────────────────── */
.item-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.item-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(194,24,91,0.12); }
.item-card.is-claimed  { border-color: #ffcc80; opacity: 0.92; }
.item-card.is-purchased { border-color: #c8e6c9; opacity: 0.8; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.9rem 1rem 0.5rem;
  gap: 0.5rem;
}

.card-header h3 {
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}
/* Lavender sprig appended to each item name */
.item-lavender {
  display: inline-block;
  margin-left: 0.35rem;
  vertical-align: -0.4em;
  flex-shrink: 0;
}

.status-badge {
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-badge.Needed    { background: #e8f5e9; color: #2e7d32; }
.status-badge.Claimed   { background: #fff3e0; color: #e65100; }
.status-badge.Purchased { background: #eeeeee; color: #555; }

.card-qty {
  padding: 0 1rem;
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

.card-divider { border: none; border-top: 1px solid var(--border); margin: 0.5rem 0; }

.card-img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #fafafa;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
}

.shop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.card-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.shop-btn {
  display: inline-block;
  margin-bottom: 0;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--pink);
  color: var(--pink);
  transition: all 0.15s;
  cursor: pointer;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}
.shop-btn:hover { background: var(--pink); color: #fff; }

.card-product-name {
  padding: 0.4rem 1rem 0.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.card-notes {
  padding: 0.1rem 1rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-soft);
  font-style: italic;
}

.card-footer {
  margin-top: auto;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.claim-btn {
  width: 100%;
  padding: 0.6rem;
  background: linear-gradient(135deg, var(--pink) 0%, var(--lavender) 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.claim-btn:hover { opacity: 0.9; transform: scale(1.01); }
.claim-btn:active { transform: scale(0.99); }

.claimed-by {
  text-align: center;
  font-size: 0.85rem;
  color: #e65100;
  font-weight: 600;
}

.claimed-by.purchased { color: #388e3c; }

.unclaim-btn {
  display: block;
  margin: 0.4rem auto 0;
  background: none;
  border: none;
  color: #bdbdbd;
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.unclaim-btn:hover { color: #e53935; }

.partial-claim-info {
  text-align: center;
  font-size: 0.82rem;
  color: #e65100;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.partial-claimers {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}

/* Priority badges + card accents */
.card-title-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.priority-badge.must-have    { background: #ffebee; color: #c62828; }
.priority-badge.nice-to-have { background: #f3e5f5; color: #6a1b9a; }

.item-card.prio-must-have    { border-left: 4px solid #e53935; }
.item-card.prio-nice-to-have { border-left: 4px solid #ab47bc; }

/* Contribute (group-gift fund) button */
.contribute-btn {
  display: block;
  margin-top: 0.5rem;
  text-align: center;
  padding: 0.5rem;
  background: #fff3e0;
  color: #e65100;
  border: 1.5px solid #ffcc80;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.contribute-btn:hover { background: #e65100; color: #fff; }

/* Success modal photo banner */
.success-modal { padding-top: 0; overflow: hidden; }
.success-modal h2 { margin-top: 1.25rem; }
.success-photo {
  display: block;
  width: calc(100% + 4rem);
  margin: 0 -2rem 0.25rem;
  height: 180px;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.9s ease;
  background: var(--pink-light);
}
.success-photo.loaded { opacity: 1; transform: scale(1); }

/* Day-of-due-date header takeover */
.site-header.due-day-takeover {
  background:
    linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
    url('/photos/cake-cut.jpg') center/cover no-repeat;
}
.site-header.due-day-takeover h1 {
  font-size: 3.2rem;
  background: linear-gradient(135deg, #c2185b, #6a1b9a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 14px rgba(255,255,255,0.6);
}
.site-header.due-day-takeover h1::after {
  content: ' 🎉';
  -webkit-text-fill-color: initial;
  color: initial;
}
.site-header.due-day-takeover .due-countdown {
  background: linear-gradient(135deg, #c2185b, #6a1b9a);
  color: #fff;
  font-size: 1rem;
  padding: 0.6rem 1.5rem;
}
.site-header.due-day-takeover .due-countdown .due-label,
.site-header.due-day-takeover .due-countdown .due-sep { color: rgba(255,255,255,0.8); }

/* Success / shipping modal */
.shipping-box {
  background: var(--pink-light);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  margin-bottom: 0.5rem;
}
.shipping-box pre {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 0.6rem;
  line-height: 1.45;
}
#shipping-copied { color: #2e7d32; font-size: 0.82rem; margin-left: 0.6rem; }

/* Shop-now claim reminder banner */
.claim-reminder-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fff3e0;
  border: 2px solid #fb8c00;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: #5d3a00;
  line-height: 1.45;
}
.claim-reminder-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Admin: claim messages display */
.claim-messages-list {
  background: var(--pink-light);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.claim-message-item {
  background: #fff;
  border-left: 3px solid var(--pink);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
}
.claim-message-item .cm-from {
  font-weight: 600;
  color: var(--pink-dark);
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
}
.claim-message-item .cm-text { font-style: italic; color: #555; }

/* Admin: thanked column */
.thanked-chip {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #e8f5e9;
  color: #2e7d32;
  font-weight: 700;
}
.thanked-chip.not-yet { background: #eeeeee; color: #9e9e9e; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal h2 { font-size: 1.2rem; margin-bottom: 0.3rem; color: var(--pink-dark); }
.modal .modal-item-name { font-weight: 600; margin-bottom: 1.25rem; color: var(--text); }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--pink);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background: var(--gray-light);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-danger  { background: #ffebee; color: #c62828; border: 1.5px solid #ef9a9a; }
.btn-danger:hover  { background: #c62828; color: #fff; }
.btn-success { background: #e8f5e9; color: #2e7d32; border: 1.5px solid #a5d6a7; }
.btn-success:hover { background: #2e7d32; color: #fff; }
.btn-warning { background: #fff8e1; color: #e65100; border: 1.5px solid #ffcc80; }
.btn-warning:hover { background: #e65100; color: #fff; }
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.78rem; }

/* ── Admin Layout ────────────────────────────────────────────────────────── */
.admin-body { background: #f8f9fa; }

.admin-header {
  background: linear-gradient(135deg, #880e4f, #6a1b9a);
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header h1 { font-size: 1.25rem; font-weight: 700; }

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Admin stat cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 4px solid var(--pink);
}

.admin-stat-card.claimed-card  { border-top-color: var(--amber); }
.admin-stat-card.purchased-card { border-top-color: var(--mint); }

.admin-stat-card .stat-num { font-size: 2rem; font-weight: 700; line-height: 1; }
.admin-stat-card .stat-lbl { font-size: 0.78rem; color: var(--text-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* Admin toolbar */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-toolbar h2 { font-size: 1.1rem; font-weight: 700; }

/* Admin table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 0.85rem;
}

.admin-table th {
  background: #fce4ec;
  color: var(--pink-dark);
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}

.admin-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fdf6f8; }
.admin-table tr.row-claimed td { background: #fff8e1; }
.admin-table tr.row-purchased td { background: #f1f8e9; }

.actions-cell { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* Admin settings panel */
.settings-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.settings-panel h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--pink-dark); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .settings-grid { grid-template-columns: 1fr; } }

/* Login page */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8bbd0, #e1bee7);
  padding: 1rem;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  text-align: center;
}

.login-card h1 { font-size: 1.5rem; color: var(--pink-dark); margin-bottom: 0.3rem; }
.login-card p  { color: var(--text-soft); margin-bottom: 1.5rem; font-size: 0.9rem; }
.login-error   { color: #c62828; font-size: 0.85rem; margin-top: 0.75rem; }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.no-items-msg { grid-column: 1/-1; text-align: center; color: var(--text-soft); padding: 3rem 0; font-size: 0.95rem; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .page-body {
    flex-direction: column;
    padding: 0.75rem 0.75rem 2rem;
    gap: 0.75rem;
  }

  .sidebar {
    width: 100%;
    position: static;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem 1rem;
    /* No horizontal scroll — content wraps to fit instead */
  }

  .sidebar-section {
    width: 100%;
    flex-shrink: 1;
  }

  /* Filter buttons wrap to multiple rows on narrow screens */
  #category-filters,
  #status-filters {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .filter-btn {
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
  }

  /* Price slider fits the full sidebar width */
  .price-slider-wrap {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .site-header h1 { font-size: 3.6rem; }
  .items-grid { grid-template-columns: 1fr; }
  .progress-stats { gap: 0.6rem; }
  .admin-header { flex-direction: column; gap: 0.5rem; text-align: center; }
}
