/* ReSouled brand palette — periwinkle/blue-violet, warm peach, soft lavender.
   Cute, soft, friendly, mobile-first. */
:root {
  --periwinkle: #6B6BB5;
  --periwinkle-light: #9a9ad6;
  --lavender: #ECECF8;
  --lavender-2: #F6F4FB;
  --peach: #F6D9C4;
  --peach-deep: #E9A985;
  --ink: #3a3a55;
  --muted: #8585a3;
  --white: #fff;
  --good: #6DBF8B;
  --warn: #E9A985;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(107, 107, 181, 0.14);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "Nunito", system-ui, sans-serif;
  background: linear-gradient(180deg, var(--lavender-2), var(--lavender));
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: 84px;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(255,255,255,0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid #e6e2f2;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.brand-name { font-weight: 800; color: var(--periwinkle); font-size: 19px; letter-spacing: .2px; }
.brand-tag { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }

main { padding: 16px; max-width: 640px; margin: 0 auto; }
.loading { text-align: center; color: var(--muted); padding: 40px; }

h2.page-title { font-size: 22px; margin: 4px 0 16px; color: var(--periwinkle); }
.sub { color: var(--muted); font-size: 14px; margin: -8px 0 16px; }

/* Cards grid (dashboard) */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 4px; border: 1px solid #efecf9;
}
.card .num { font-size: 30px; font-weight: 800; color: var(--periwinkle); }
.card .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.card.wide { grid-column: 1 / -1; background: linear-gradient(120deg, var(--periwinkle), var(--periwinkle-light)); color: #fff; }
.card.wide .num, .card.wide .lbl { color: #fff; }
.card .emoji { font-size: 20px; }

/* Tasks */
.tasks { margin-top: 18px; }
.tasks h3 { font-size: 15px; color: var(--ink); margin: 0 0 10px; }
.task {
  display: flex; align-items: center; gap: 12px; background: #fff;
  border-radius: 14px; padding: 13px 15px; margin-bottom: 9px; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); border: 1px solid #efecf9;
}
.task .t-emoji { font-size: 20px; }
.task .t-text { font-size: 14px; font-weight: 600; flex: 1; }
.task .t-go { color: var(--periwinkle-light); font-size: 18px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--periwinkle); color: #fff; border: none; border-radius: 14px;
  padding: 14px 18px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%;
  box-shadow: var(--shadow); font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--periwinkle); border: 1.5px solid var(--periwinkle-light); box-shadow: none; }
.btn.peach { background: var(--peach-deep); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.small { width: auto; padding: 9px 14px; font-size: 13px; border-radius: 11px; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid #e2ddf2; border-radius: 12px;
  font-size: 16px; font-family: inherit; background: #fff; color: var(--ink);
}
.field textarea { min-height: 80px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Photo uploader */
.photo-zone {
  border: 2px dashed var(--periwinkle-light); border-radius: var(--radius);
  padding: 22px; text-align: center; background: #fff; color: var(--muted); cursor: pointer;
}
.photo-zone .pz-emoji { font-size: 34px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; border: 1.5px solid #e2ddf2; }

/* Inventory list */
.inv-item {
  display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 14px;
  padding: 11px; margin-bottom: 10px; box-shadow: var(--shadow); text-decoration: none;
  color: var(--ink); border: 1px solid #efecf9;
}
.inv-item img, .inv-ph {
  width: 58px; height: 58px; border-radius: 11px; object-fit: cover; flex-shrink: 0;
  background: var(--lavender); display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.inv-item .ii-title { font-weight: 700; font-size: 15px; }
.inv-item .ii-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.inv-item .ii-price { margin-left: auto; font-weight: 800; color: var(--periwinkle); }

/* Status pills + filters */
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.pill.needs_photos { background: var(--peach); color: #8a5a3a; }
.pill.ready_to_list { background: #DDEBFF; color: #3a5a8a; }
.pill.listed { background: #E5DEF8; color: var(--periwinkle); }
.pill.sold, .pill.shipped { background: #D8F0E2; color: #2f7a52; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 6px; }
.filters a { white-space: nowrap; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 20px;
  background: #fff; color: var(--muted); text-decoration: none; border: 1px solid #e6e2f2; }
.filters a.active { background: var(--periwinkle); color: #fff; }

/* Detail */
.detail-hero { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.detail-hero img, .detail-ph { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; background: var(--lavender);
  display:flex; align-items:center; justify-content:center; font-size:34px; }
.detail-hero h2 { margin: 0 0 4px; font-size: 19px; }
.block { background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); border: 1px solid #efecf9; }
.block h3 { margin: 0 0 10px; font-size: 15px; color: var(--periwinkle); display:flex; align-items:center; gap:7px; }
.listing-platform { border-top: 1px solid #f0edf8; padding-top: 12px; margin-top: 12px; }
.listing-platform:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.lp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.lp-head .lp-name { font-weight: 700; font-size: 14px; }
.lp-body { background: var(--lavender-2); border-radius: 11px; padding: 11px; font-size: 13px;
  white-space: pre-wrap; line-height: 1.5; color: var(--ink); border: 1px solid #ece7f8; }
.copy-btn { margin-left: auto; }
.copied { color: var(--good); font-weight: 700; }

.steps { padding-left: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 8px 0 8px 36px; font-size: 14px; border-bottom: 1px dashed #eee; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 7px; width: 24px; height: 24px;
  background: var(--periwinkle); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.steps li:last-child { border-bottom: none; }

.banner { border-radius: 12px; padding: 11px 13px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.banner.info { background: #DDEBFF; color: #3a5a8a; }
.banner.warn { background: var(--peach); color: #8a5a3a; }
.banner.good { background: #D8F0E2; color: #2f7a52; }

.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .e-emoji { font-size: 44px; }

/* Bottom tab bar */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-top: 1px solid #e6e2f2; padding-bottom: env(safe-area-inset-bottom);
}
.tab { flex: 1; text-align: center; padding: 9px 0 8px; text-decoration: none; color: var(--muted); font-size: 20px; }
.tab span { display: block; font-size: 10.5px; font-weight: 700; margin-top: 1px; }
.tab.active { color: var(--periwinkle); }

.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; }
.mt { margin-top: 14px; }
