/* ============================================================
   Giftify — web app styles (onboarding + dashboard)
   Builds on base.css (tokens + primitives). App-specific only.
   ============================================================ */

/* ---------- root / body ---------- */
body {
  background: linear-gradient(180deg, #f7f5fd, #f1edfb);
  background-attachment: fixed;
}
#app-root { min-height: 100vh; }
a, button { cursor: pointer; }

/* decorative screen background (shared by onboarding / processing / done) */
.onb-screen,
.proc-wrap,
.done-wrap {
  background:
    radial-gradient(600px 420px at 12% 6%, rgba(228, 220, 250, 0.75), transparent 62%),
    radial-gradient(520px 420px at 88% 92%, rgba(236, 233, 252, 0.9), transparent 62%),
    radial-gradient(430px 330px at 86% 8%, rgba(244, 240, 253, 0.85), transparent 60%),
    linear-gradient(180deg, #f7f5fd, #f1edfb);
}

/* ============================================================
   ONBOARDING (centered card)
   ============================================================ */
.onb-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.onb-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 36px 34px;
  width: min(430px, 100%);
  text-align: center;
}
.onb-logo {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.onb-card .brand,
.side-brand .brand {
  margin-bottom: 12px;
}
.brand img {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.onb-title {
  font-size: 22px;
  font-weight: 900;
}
.onb-sub {
  font-size: 14.5px;
  color: var(--body);
  margin: 6px 0 22px;
}

/* oauth buttons */
.oauth-btn {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.oauth-btn:hover { border-color: var(--primary); text-decoration: none; }
.g-badge,
.a-badge {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.a-badge { color: var(--ink); font-size: 19px; line-height: 1; }

/* "or" divider with hairlines */
.onb-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.onb-divider::before,
.onb-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* fields stack */
.onb-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.onb-card .field { text-align: left; }

.onb-cta {
  width: 100%;
  margin-top: 18px;
}
.onb-foot {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 16px;
}

/* ============================================================
   IMPORT SCREEN
   ============================================================ */
.import-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.source-row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.source-row:hover { border-color: #c9befa; }

/* brand tiles */
.source-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.source-ic.wa { background: var(--wa); color: #fff; }
.source-ic.im {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--wa);
}
.source-ic.gm {
  background: #fff;
  border: 1.5px solid var(--border);
  color: #ea4335;
  font-weight: 800;
}
.source-ic.ig { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); color: #fff; }
.source-ic.file { background: var(--primary-soft); color: var(--primary); }

.source-txt { flex: 1; min-width: 0; text-align: left; }
.source-txt strong { display: block; font-size: 15px; }
.source-sub {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}

/* connection state */
.source-state {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  flex-shrink: 0;
}
.source-row.connecting .source-state::after {
  content: "";
  animation: ellipsis 1.2s steps(1, end) infinite;
}
.source-row.connected {
  border-color: #bfe8d6;
  background: #f2fcf8;
}
.source-row.connected .source-state { color: var(--success); }
.source-row.connected .source-state::before {
  content: "\2713\00A0";
  font-weight: 800;
}

/* #chat-file uses .visually-hidden from base.css — no extra styles needed */

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.import-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
#import-continue { width: 100%; }
#import-continue[disabled] { opacity: 0.55; }
.link-btn {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
}
.link-btn:hover { text-decoration: underline; }
.sample-link {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: underline;
}

/* ============================================================
   PROCESSING SCREEN
   ============================================================ */
.proc-wrap {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}
.proc-icons {
  position: relative;
  height: 120px;
  width: 100%;
}
.proc-tile {
  position: absolute;
  width: 44px;
  height: 44px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  font-size: 20px;
  animation: floatY 3.2s ease-in-out infinite;
}
.proc-tile:nth-child(1) { left: 5%; top: 4px; }
.proc-tile:nth-child(2) { right: 8%; top: 14px; animation-delay: 0.5s; }
.proc-tile:nth-child(3) { left: 14%; bottom: 0; animation-delay: 1s; }
.proc-tile:nth-child(4) { right: 18%; bottom: 6px; animation-delay: 1.5s; }
.proc-tile.wa { background: #25d366; border-color: #25d366; }

.proc-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  z-index: 2;
}
.proc-spinner img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.proc-spinner::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: conic-gradient(var(--primary), transparent);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: spin 1.4s linear infinite;
}

.proc-checklist {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 28px;
}
.proc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.35;
  transform: translateY(4px);
  transition: opacity 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.proc-item::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--lavender);
}
.proc-item.doing {
  opacity: 1;
  color: var(--ink-soft);
  transform: none;
}
.proc-item.doing::before {
  background-image: radial-gradient(circle, var(--primary) 0 3px, transparent 3.5px);
  background-repeat: no-repeat;
  background-position: center;
  animation: dotPulse 1s ease-in-out infinite;
}
.proc-item.done {
  opacity: 1;
  transform: none;
}
.proc-item.done::before {
  content: "\2713";
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  background: var(--success);
  animation: none;
}

.progress {
  height: 7px;
  background: var(--border);
  border-radius: 999px;
  margin-top: 24px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6e52ff, var(--primary));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.proc-note {
  margin-top: 22px;
  background: var(--primary-soft);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  gap: 8px;
}
#proc-skip {
  display: block;
  margin: 14px auto 0;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: underline;
}

/* ============================================================
   REVIEW SCREEN
   ============================================================ */
.review-head {
  text-align: center;
  margin-bottom: 20px;
}
.review-head h1 { font-size: 22px; font-weight: 900; }
.review-head p { font-size: 14px; color: var(--muted); margin-top: 6px; }

.review-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 470px;
  margin: 0 auto;
}
.person-row {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  transition: box-shadow 0.18s ease;
}
.person-row:hover { box-shadow: var(--shadow-md); }

.pr-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.pr-info { flex: 1; min-width: 0; }
.pr-info strong { display: block; font-size: 15.5px; }
.pr-info .rel { font-size: 13px; color: var(--muted); }
.pr-info .input {
  padding: 8px 10px;
  font-size: 14px;
  margin: 2px 0;
}
.pr-edit {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.pr-edit:hover { background: var(--lavender); color: var(--ink); }
.pr-occ { font-size: 12px; padding: 4px 10px; }
.pr-open {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lavender);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.pr-open:hover { background: var(--primary); color: #fff; }

.pr-chips {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.pr-chips .chip { font-size: 12px; padding: 4px 10px; }
.chip-more {
  background: #fff;
  border: 1.5px solid var(--border-strong);
  color: var(--muted);
}

.review-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
#review-continue { min-width: 280px; }
#review-later {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: underline;
}

/* ============================================================
   DONE SCREEN
   ============================================================ */
.done-wrap {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.done-art {
  width: 300px;
  max-width: 100%;
  margin-bottom: 8px;
}
.done-title { font-size: 30px; font-weight: 900; }
.done-sub {
  font-size: 15px;
  color: var(--muted);
  margin: 10px 0 24px;
}
#go-dashboard { min-width: 280px; }

.done-first {
  margin-top: 26px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.done-first:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.done-first > span:first-child {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--lavender);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.done-first strong { display: block; font-size: 15px; }
.done-first p { font-size: 13px; color: var(--muted); }
.done-first > button {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lavender);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.done-first > button:hover { background: var(--primary); color: #fff; }

/* ============================================================
   APP SHELL
   ============================================================ */
.shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

/* sidebar */
.sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 22px;
  font-size: 20px;
  font-weight: 900;
  text-transform: lowercase;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.side-brand img { width: 34px; height: 34px; }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--body);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.side-link svg { width: 19px; height: 19px; flex-shrink: 0; }
.side-link:hover {
  background: var(--primary-soft-2);
  color: var(--ink);
  text-decoration: none;
}
.side-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.side-promo {
  margin-top: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-xs);
}
.side-promo > span:first-child {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--lavender);
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}
.side-promo strong { display: block; font-size: 13.5px; }
.side-promo span { font-size: 12px; color: var(--muted); }

/* main column */
.shell-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 245, 253, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(233, 230, 244, 0.5);
}
.search-wrap {
  flex: 1;
  max-width: 460px;
  position: relative;
}
.search-ic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  display: flex;
  pointer-events: none;
}
.search-ic svg { width: 16px; height: 16px; }
.search-wrap input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-wrap input::placeholder { color: #a5a1bf; }
.search-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 51, 232, 0.12);
}
.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  padding: 0;
  transition: box-shadow 0.15s ease;
}
.top-avatar:hover { box-shadow: 0 0 0 3px rgba(79, 51, 232, 0.3); }

/* user dropdown */
.user-menu {
  position: absolute;
  right: 28px;
  top: 64px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  width: 230px;
  z-index: 60;
  display: none;
}
.user-menu.open {
  display: block;
  animation: menuPop 0.16s ease;
}
.user-menu-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  min-width: 0;
}
.user-menu-head strong { display: block; font-size: 14px; }
.user-menu-head span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.user-menu-item:hover {
  background: var(--primary-soft-2);
  text-decoration: none;
}
.user-menu-item.danger { color: var(--danger); }
.user-menu-item.danger:hover { background: var(--danger-soft); }

/* view container */
#view {
  padding: 28px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  animation: viewIn 0.25s ease;
}

/* ============================================================
   SHARED VIEW BITS
   ============================================================ */
.view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.view-title { font-size: 24px; font-weight: 900; }
.head-sub {
  font-size: 14px;
  color: var(--body);
  margin: 4px 0 22px;
}
.view-actions { display: flex; gap: 10px; }

/* days chip */
.days-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.days-chip.soon { background: var(--danger-soft); color: var(--danger); }
.days-chip.today { background: var(--success-soft); color: var(--success); }

/* filter chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 18px;
}
.filter-chip,
.budget-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--border);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--body);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.filter-chip:hover,
.budget-btn:hover { border-color: var(--primary); }
.filter-chip.active,
.budget-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* budget dropdown */
.budget-wrap {
  position: relative;
  display: inline-block;
}
.budget-btn { display: inline-flex; align-items: center; }
.budget-btn::after {
  content: "\25BE";
  margin-left: 7px;
  font-size: 10px;
}
.budget-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 170px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 30;
  display: none;
}
.budget-menu.open { display: block; animation: menuPop 0.16s ease; }
.budget-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  transition: background-color 0.15s ease;
}
.budget-item:hover { background: var(--primary-soft-2); }
.budget-item.selected {
  color: var(--primary);
  font-weight: 800;
}

/* ============================================================
   PEOPLE / PRODUCT GRIDS
   ============================================================ */
.people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .people-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .people-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .people-grid { grid-template-columns: 1fr; } }

.person-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.person-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.pc-top {
  position: relative;
  display: inline-block;
}
.pc-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}
.pc-days {
  position: absolute;
  top: -6px;
  right: -34px;
  z-index: 1;
}
.pc-name {
  display: block;
  font-size: 15.5px;
  font-weight: 900;
}
.pc-occ {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

/* initials fallback avatar */
.avatar-fallback {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #6e52ff, var(--primary));
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
  object-fit: cover;
}
.pc-avatar.avatar-fallback { font-size: 26px; margin-bottom: 10px; }
.pr-avatar.avatar-fallback { font-size: 19px; }
.ph-avatar.avatar-fallback { font-size: 30px; }
.top-avatar.avatar-fallback { font-size: 16px; }
.list-row img.avatar-fallback { font-size: 18px; }
.ideas-meta img.avatar-fallback { font-size: 17px; }

/* products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1000px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .products-grid { grid-template-columns: 1fr; } }

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.prod-img {
  height: 130px;
  display: grid;
  place-items: center;
  position: relative;
  background: var(--lavender);
}
.prod-img .emoji {
  font-size: 44px;
  filter: drop-shadow(0 6px 10px rgba(23, 18, 59, 0.18));
}

/* pastel duotone gradients (image placeholders / tiles) */
.grad-1 { background: linear-gradient(135deg, #e8f6ec, #c9ecd6); }
.grad-2 { background: linear-gradient(135deg, #eef3e2, #d3e6bd); }
.grad-3 { background: linear-gradient(135deg, #fdf0dd, #f9d9a8); }
.grad-4 { background: linear-gradient(135deg, #e7ebfd, #c5cdf7); }
.grad-5 { background: linear-gradient(135deg, #fdeef3, #f7cdda); }
.grad-6 { background: linear-gradient(135deg, #f3ecfd, #dcc9f7); }
.grad-7 { background: linear-gradient(135deg, #fdf3e0, #f3d9ae); }
.grad-8 { background: linear-gradient(135deg, #efe9e2, #dcc8b4); }
.grad-9 { background: linear-gradient(135deg, #e2f1fb, #bcdcf2); }
.grad-10 { background: linear-gradient(135deg, #f4ece2, #e0cdb4); }
.grad-11 { background: linear-gradient(135deg, #e3f4ef, #c0e5d8); }
.grad-12 { background: linear-gradient(135deg, #ece9fa, #cfcaf0); }
.grad-13 { background: linear-gradient(135deg, #fdeadd, #f7cfb2); }
.grad-14 { background: linear-gradient(135deg, #e6f2ea, #c5e2d0); }

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}
.fav-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
}
.fav-btn:hover { transform: scale(1.08); }
.fav-btn.active svg {
  fill: var(--danger);
  stroke: var(--danger);
}

.prod-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.prod-title { font-size: 15px; font-weight: 900; }
.prod-sub { font-size: 12.5px; color: var(--muted); }
.prod-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.price { font-size: 15px; font-weight: 900; }
.rating { font-size: 12.5px; color: var(--muted); }
.rating .star { color: #f5a623; }

.why-list {
  list-style: none;
  margin: 8px 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.why-list li {
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.why-list li::before {
  content: "\2713";
  color: var(--primary);
  font-weight: 800;
  flex-shrink: 0;
}
.create-gift {
  margin-top: auto;
  width: 100%;
}

/* empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 70px 20px;
  text-align: center;
}
.empty-ic {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--lavender);
  display: grid;
  place-items: center;
  font-size: 30px;
}
.empty-state h3 { font-size: 18px; font-weight: 900; }
.empty-state p {
  font-size: 14px;
  color: var(--muted);
  max-width: 34ch;
}
.empty-state .btn { margin-top: 8px; }

/* ============================================================
   PROFILE VIEW
   ============================================================ */
.profile-head {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.back-btn:hover { background: var(--lavender); border-color: var(--border-strong); }
.ph-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
}
.ph-info { flex: 1; min-width: 200px; }
.ph-info h2 { font-size: 21px; font-weight: 900; }
.ph-rel { font-size: 13.5px; color: var(--muted); }
.ph-occ { margin-top: 8px; }
.ph-actions { display: flex; gap: 8px; }

/* tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 22px;
}
.tab {
  padding: 11px 16px;
  font-weight: 800;
  font-size: 14px;
  color: var(--body);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab:hover { color: var(--ink); }
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* tab panes */
.pane { display: none; }
.pane.active {
  display: block;
  animation: fadeUp 0.25s ease;
}

.about-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
}
.about-card h3 { font-size: 15.5px; font-weight: 900; margin-bottom: 8px; }
.about-card p { font-size: 14.5px; color: var(--body); }

.interests-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
  margin-top: 16px;
}
.interests-block h3 { font-size: 15.5px; font-weight: 900; margin-bottom: 12px; }
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips-row .chip { font-size: 13px; padding: 7px 12px; }
.chip-add-btn {
  border: 1.5px dashed var(--primary);
  color: var(--primary);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  transition: background-color 0.15s ease;
}
.chip-add-btn:hover { background: var(--primary-soft-2); }
.add-interest-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.add-interest-row input {
  flex: 1;
  max-width: 240px;
  padding: 9px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.add-interest-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 51, 232, 0.12);
}

/* occasions list (profile) */
.occ-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.occ-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}
.occ-row > span:first-child { font-size: 20px; flex-shrink: 0; }
.occ-row .or-info { flex: 1; min-width: 0; }
.occ-row .or-info strong { display: block; font-size: 14.5px; }
.occ-row .or-info span { font-size: 12.5px; color: var(--muted); }
.occ-del {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.occ-del:hover { background: var(--danger-soft); color: var(--danger); }

.add-occ-btn {
  width: 100%;
  margin-top: 12px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  padding: 12px;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  background: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.add-occ-btn:hover {
  background: var(--primary-soft-2);
  border-color: var(--primary);
}

/* insights */
.insight-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
}
.ins-ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--lavender);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.insight-card strong { display: block; font-size: 14.5px; }
.insight-card p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 2px 0;
}
.insight-card blockquote {
  font-size: 13px;
  font-style: italic;
  color: var(--ink-soft);
  background: #f6f4fc;
  border-left: 3px solid #c9befa;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 6px 0 0;
}

/* ============================================================
   IDEAS VIEW
   ============================================================ */
.ideas-head {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px 22px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ideas-head h2 {
  font-size: 21px;
  font-weight: 900;
  flex-basis: 100%;
}
.ideas-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ideas-meta img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.im-info { min-width: 0; }
.im-info strong { display: block; font-size: 14.5px; }
.im-info span { font-size: 12.5px; color: var(--muted); }
#modify-filters { margin-left: auto; }

/* ============================================================
   LIST ROWS (People / Occasions / Orders)
   ============================================================ */
.list-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.list-row,
.occ-row-big {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow 0.15s ease;
}
.list-row:hover,
.occ-row-big:hover { box-shadow: var(--shadow-sm); }
.list-row > img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.lr-info { flex: 1; min-width: 0; }
.lr-info strong { display: block; font-size: 15px; }
.lr-info span { font-size: 13px; color: var(--muted); }
.list-row > button:last-child {
  color: var(--muted);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.occ-row-big > span:first-child {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--lavender);
  display: grid;
  place-items: center;
  font-size: 28px;
  flex-shrink: 0;
}
.occ-row-big strong { display: block; font-size: 15px; }
.occ-row-big .or-info { flex: 1; min-width: 0; }
.occ-row-big .or-info span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}

/* orders */
.order-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.oi-emoji {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--lavender);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.oi-info { flex: 1; min-width: 0; }
.oi-info strong { display: block; font-size: 14.5px; }
.oi-date { font-size: 12.5px; color: var(--muted); }
.oi-status { font-size: 12px; padding: 4px 10px; }
.oi-price { font-size: 15px; font-weight: 900; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  max-width: 560px;
  margin-bottom: 16px;
}
.settings-card h3 { font-size: 15.5px; font-weight: 900; margin-bottom: 14px; }
.settings-card .field { margin-bottom: 12px; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f0eef8;
}
.switch-row:last-child { border-bottom: 0; }
.switch-row > span {
  font-size: 14.5px;
  font-weight: 700;
}

/* toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 21px;
  border-radius: 999px;
  background: var(--border-strong);
  flex-shrink: 0;
  transition: background-color 0.2s ease;
  cursor: pointer;
}
.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}
.switch:has(input:checked) { background: var(--primary); }
.switch:has(input:checked)::after { transform: translateX(15px); }
.switch:has(input:focus-visible) {
  outline: 3px solid rgba(79, 51, 232, 0.45);
  outline-offset: 2px;
}

/* danger zone */
.danger-zone {
  border: 1.5px solid #f5c6c8;
  border-radius: 16px;
  padding: 18px;
}
.danger-zone p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #d13a3f; text-decoration: none; }

/* ============================================================
   CHECKOUT MODAL (base .modal-backdrop / .modal)
   ============================================================ */
.co-product {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f6f4fc;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.co-tile {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.co-product strong { display: block; font-size: 14.5px; }
.co-product span { font-size: 12.5px; color: var(--muted); }

.co-row { margin-bottom: 12px; }
.co-row label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.co-row select {
  width: 100%;
  padding: 12px 38px 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235a567a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px;
  appearance: none;
  -webkit-appearance: none;
  font-size: 14.5px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.co-row select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 51, 232, 0.12);
}

.co-summary {
  border-top: 1.5px solid var(--border);
  margin-top: 14px;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.co-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-soft);
}
.co-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 900;
  border-top: 1.5px solid var(--border);
  padding-top: 10px;
  margin-top: 4px;
}

.pay-btn {
  width: 100%;
  margin-top: 16px;
}
.pay-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}
.pay-btn.loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.pay-success {
  text-align: center;
  padding: 14px 0;
}
.ps-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 30px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}
.pay-success h3 { font-size: 19px; font-weight: 900; }
.pay-success p {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 18px;
}
.pay-success > div {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .side-brand {
    padding: 2px 8px 2px 0;
    font-size: 18px;
  }
  .side-brand img { width: 28px; height: 28px; }
  .side-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 2px;
    flex: 1;
    scrollbar-width: none;
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-link {
    padding: 8px 12px;
    white-space: nowrap;
  }
  .side-promo { display: none; }
  .topbar { padding: 12px 16px; }
  #view { padding: 20px 16px; }
  .user-menu { right: 16px; }
}

@media (max-width: 640px) {
  .products-grid { grid-template-columns: 1fr; }
  .people-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .profile-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
  }
  .ph-info { min-width: 0; }
  .ph-occ { display: flex; justify-content: center; }
  .ph-actions { justify-content: center; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .view-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .modal { padding: 20px; }
  .onb-card { padding: 28px 22px; }
  .proc-wrap { padding: 40px 18px; }
  .done-wrap { padding: 44px 18px; }
  #review-continue,
  #go-dashboard { min-width: 0; width: 100%; }
}

@media (max-width: 420px) {
  .people-grid { grid-template-columns: 1fr; }
  .pc-days { right: -10px; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes menuPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-6px);
  }
}
@keyframes dotPulse {
  0%, 100% { background-size: 45% 45%; }
  50% { background-size: 80% 80%; }
}
@keyframes ellipsis {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

/* reduced motion (belt & suspenders — base.css enforces globally) */
@media (prefers-reduced-motion: reduce) {
  .proc-tile,
  .proc-spinner::after,
  .proc-item.doing::before,
  #view,
  .pane.active,
  .user-menu.open,
  .budget-menu.open,
  .modal-backdrop,
  .modal {
    animation: none;
  }
  .progress-bar,
  .person-card,
  .product-card,
  .done-first {
    transition: none;
  }
}

/* cloudflare turnstile widget on signup */
.ts-box {
  display: flex;
  justify-content: center;
  margin: 4px 0 2px;
  min-height: 65px;
  align-items: center;
}

/* generated imagery */
.prod-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.product-card:hover .prod-img img { transform: scale(1.045); }
.done-art { mix-blend-mode: multiply; }

/* generated photo avatars keep their circular crop inside wrapper spans */
.pc-avatar img, .pc-top .pc-avatar img {
  border-radius: 50%;
  object-fit: cover;
}

/* real chat import: dropzone + paste + AI ideas */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  margin-bottom: 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--primary);
  background: var(--primary-soft-2);
}
.dropzone .dz-ic svg { width: 26px; height: 26px; }
.dropzone strong { font-size: 15px; }
.dropzone .dz-sub { font-size: 12.5px; color: var(--muted); }
.paste-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.paste-wrap textarea.input { resize: vertical; min-height: 64px; font-size: 13px; }
.paste-wrap .btn { align-self: flex-end; }
.ai-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.rating.ai-src { color: var(--primary); font-weight: 800; }
.ai-ideas-head { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 12px; flex-wrap: wrap; }
.ai-ideas-head h3 { font-size: 15.5px; font-weight: 900; }
.ai-when { font-size: 12.5px; color: var(--muted); }
