/* Kitse — Seller Onboarding Demo
   Shared styling. Warm, community, "Eat deliciously" brand voice. */

:root {
  --bg:        #FFFBF5;
  --surface:   #FFFFFF;
  --surface-2: #FFF6EC;
  --ink:       #2A2320;
  --ink-soft:  #6B5F57;
  --ink-faint: #9C9087;
  --brand:     #E2552B;
  --brand-dark:#C4441E;
  --brand-soft:#FBE7DC;
  --accent:    #3F7D5B;
  --accent-soft:#E6F0E9;
  --warn:      #B47A12;
  --warn-soft: #FAEFD6;
  --danger:    #B23B3B;
  --danger-soft:#F8E4E1;
  --line:      #EEE4D7;
  --line-2:    #E2D6C6;
  --shadow:    0 1px 2px rgba(42,35,32,.04), 0 8px 24px rgba(42,35,32,.06);
  --shadow-lg: 0 12px 40px rgba(42,35,32,.12);
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 .4em;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1rem; color: var(--ink-soft); }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-faint); }
.center { text-align: center; }

/* ---------- Top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,251,245,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 8px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Fraunces", serif;
  font-weight: 600; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand .dot { width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #F2934C);
  display: grid; place-items: center; color: #fff; font-size: 15px; }
.nav .links { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav .links a { padding: 8px 14px; border-radius: 999px; color: var(--ink-soft);
  font-size: .92rem; font-weight: 500; text-decoration: none; }
.nav .links a:hover { background: var(--surface-2); color: var(--ink); }
.nav .links a.active { background: var(--ink); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(226,85,43,.28); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

/* ---------- Generic cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Badges / pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: .76rem; font-weight: 600;
  letter-spacing: .02em; text-transform: uppercase; }
.pill-brand  { background: var(--brand-soft);  color: var(--brand-dark); }
.pill-accent { background: var(--accent-soft);  color: var(--accent); }
.pill-warn   { background: var(--warn-soft);    color: var(--warn); }
.pill-danger { background: var(--danger-soft);  color: var(--danger); }
.pill-ghost  { background: var(--surface-2);    color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero .eyebrow { color: var(--brand-dark); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; font-size: .8rem; margin-bottom: 14px; }
.hero p.lead { font-size: 1.15rem; max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Section ---------- */
.section { padding: 48px 0; }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head p { font-size: 1.05rem; }

/* ---------- Funnel / metric stats ---------- */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px; }
.stat .num { font-family: "Fraunces", serif; font-size: 2rem; color: var(--ink); line-height: 1; }
.stat .lbl { color: var(--ink-soft); font-size: .9rem; margin-top: 6px; }
.stat .delta { font-size: .82rem; font-weight: 600; }
.up { color: var(--accent); } .down { color: var(--danger); }

/* funnel bars */
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 200px 1fr 64px; gap: 14px; align-items: center; }
.funnel-row .name { font-size: .92rem; font-weight: 500; color: var(--ink); }
.funnel-bar { height: 30px; background: var(--surface-2); border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); }
.funnel-bar > span { display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), #F2934C); }
.funnel-row .pct { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.funnel-row.leak .funnel-bar > span { background: linear-gradient(90deg, #C4441E, #E2552B); }
.funnel-row.leak .name::after { content: " ⚠"; color: var(--danger); }
@media (max-width: 640px){ .funnel-row { grid-template-columns: 130px 1fr 44px; } }

/* ---------- Onboarding dashboard ---------- */
.dash { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px){ .dash { grid-template-columns: 1fr; } }

.profile-card { text-align: center; position: sticky; top: 88px; }
.avatar { width: 96px; height: 96px; border-radius: 999px; margin: 0 auto 14px;
  display: grid; place-items: center; font-family: "Fraunces", serif; font-size: 2.2rem;
  color: #fff; background: linear-gradient(135deg, var(--brand), #F2934C);
  border: 3px dashed transparent; position: relative; }
.avatar.empty { background: var(--surface-2); color: var(--ink-faint);
  border: 3px dashed var(--line-2); }
.avatar .cam { position: absolute; bottom: -2px; right: -2px; width: 30px; height: 30px;
  background: var(--ink); color: #fff; border-radius: 999px; display: grid; place-items: center;
  font-size: 14px; border: 2px solid var(--surface); }

/* progress ring */
.ring-wrap { position: relative; width: 132px; height: 132px; margin: 6px auto 8px; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-wrap .ring-num { position: absolute; inset: 0; display: grid; place-items: center;
  flex-direction: column; }
.ring-num b { font-family: "Fraunces", serif; font-size: 1.9rem; line-height: 1; }
.ring-num small { color: var(--ink-faint); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }

/* status banner */
.banner { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px;
  display: flex; gap: 14px; align-items: flex-start; border: 1px solid transparent; }
.banner .ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; font-size: 20px; }
.banner h3 { margin: 0 0 3px; font-family: "Inter", sans-serif; font-size: 1.02rem; font-weight: 700; }
.banner p { margin: 0; font-size: .92rem; }
.banner.blocked { background: var(--danger-soft); border-color: #EFC9C2; }
.banner.blocked .ic { background: var(--danger); color: #fff; }
.banner.blocked h3 { color: var(--danger); }
.banner.partial { background: var(--warn-soft); border-color: #EAD9AE; }
.banner.partial .ic { background: var(--warn); color: #fff; }
.banner.partial h3 { color: var(--warn); }
.banner.live { background: var(--accent-soft); border-color: #C5DECF; }
.banner.live .ic { background: var(--accent); color: #fff; }
.banner.live h3 { color: var(--accent); }

/* checklist groups */
.group { margin-bottom: 26px; }
.group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.group-head h3 { margin: 0; font-family: "Inter", sans-serif; font-size: 1rem; font-weight: 700; }
.group-sub { font-size: .86rem; color: var(--ink-faint); margin: 0 0 14px; }

.task {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px;
  background: var(--surface); transition: border-color .15s ease, background .15s ease;
}
.task:hover { border-color: var(--line-2); }
.task.done { background: var(--surface-2); }
.task .check {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line-2); background: var(--surface); display: grid; place-items: center;
  font-size: 14px; color: transparent; transition: all .15s ease; margin-top: 1px;
}
.task .check:hover { border-color: var(--accent); }
.task.done .check { background: var(--accent); border-color: var(--accent); color: #fff; }
.task .body { flex: 1; min-width: 0; }
.task .t-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task .t-title { font-weight: 600; color: var(--ink); }
.task.done .t-title { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--line-2); }
.task .t-desc { font-size: .87rem; color: var(--ink-soft); margin: 4px 0 0; }
.task .t-nudge { font-size: .84rem; margin: 8px 0 0; padding: 8px 12px; border-radius: 8px;
  display: flex; gap: 8px; align-items: center; }
.task .t-nudge.hard { background: var(--danger-soft); color: #8A2C2C; }
.task .t-nudge.soft { background: var(--warn-soft); color: #6E4E0E; }
.task.done .t-nudge { display: none; }
.task .email-link { font-size: .82rem; font-weight: 600; white-space: nowrap; }

.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .84rem; color: var(--ink-soft);
  padding: 14px 18px; background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 22px; }
.legend b { color: var(--ink); }

/* ---------- Email gallery ---------- */
.email-grid { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px){ .email-grid { grid-template-columns: 1fr; } }
.email-list { position: sticky; top: 88px; display: grid; gap: 8px; }
.email-tab { text-align: left; width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-family: inherit;
  transition: all .12s ease; }
.email-tab:hover { border-color: var(--line-2); background: var(--surface-2); }
.email-tab.active { border-color: var(--brand); background: var(--brand-soft); }
.email-tab .et-trig { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  font-weight: 700; color: var(--ink-faint); }
.email-tab .et-sub { font-weight: 600; color: var(--ink); font-size: .94rem; margin-top: 3px; }
.email-tab.active .et-sub { color: var(--brand-dark); }

.phone { background: #ECE4D7; border-radius: 20px; padding: 18px; }
.email-frame { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg);
  max-width: 600px; margin: 0 auto; }
.email-meta { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .86rem; }
.email-meta .from { font-weight: 700; color: var(--ink); }
.email-meta .subj { color: var(--ink); margin-top: 2px; font-weight: 600; }
.email-meta .to { color: var(--ink-faint); }
.email-render { padding: 0; }
.email-render iframe { width: 100%; border: 0; display: block; }

.note { font-size: .85rem; padding: 10px 14px; border-radius: 8px; margin-top: 14px;
  background: var(--accent-soft); color: #2C5A40; border: 1px solid #C5DECF; }
.note.warn { background: var(--warn-soft); color: #6E4E0E; border-color: #EAD9AE; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 30px 0; color: var(--ink-faint);
  font-size: .86rem; }
.foot .wrap { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }

.kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .82rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }

hr.soft { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ========================================================================
   PRODUCT: the new onboarding page (interactive)
   ======================================================================== */

/* task rows become expandable */
.task { flex-wrap: wrap; cursor: default; }
.task .body { cursor: pointer; }
.task .t-cta { margin-left: auto; align-self: center; }
.task .open-btn { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink);
  border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: .84rem; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: all .12s ease; }
.task .open-btn:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand-dark); }
.task.done .open-btn { color: var(--accent); border-color: #C5DECF; }

/* drawer */
.drawer { flex-basis: 100%; margin-top: 4px; overflow: hidden;
  max-height: 0; transition: max-height .28s ease; }
.drawer.open { max-height: 760px; }
.drawer-inner { background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px; margin-top: 8px; }
.drawer-inner h4 { margin: 0 0 4px; font-size: .98rem; }
.drawer-inner p.hint { font-size: .86rem; color: var(--ink-soft); margin: 0 0 14px; }

/* forms */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 9px;
  font-family: inherit; font-size: .92rem; color: var(--ink); background: var(--surface);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 88px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px){ .field-row { grid-template-columns: 1fr; } }
.drawer-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }

/* upload zone */
.upload { border: 2px dashed var(--line-2); border-radius: 12px; padding: 26px; text-align: center;
  background: var(--surface); cursor: pointer; transition: all .15s ease; margin-bottom: 12px; }
.upload:hover { border-color: var(--brand); background: var(--brand-soft); }
.upload .ic { font-size: 28px; }
.upload p { margin: 6px 0 0; font-size: .88rem; }

/* day picker */
.days { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.day { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); cursor: pointer; font-weight: 600; font-size: .82rem; color: var(--ink-soft);
  font-family: inherit; transition: all .12s ease; }
.day.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.doc-row { display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; }
.doc-row .fic { width: 36px; height: 36px; border-radius: 8px; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; font-size: 18px; }

/* storefront preview button in sidebar */
.preview-btn { width: 100%; margin-top: 6px; }

/* ---------- Storefront preview (slide-in) ---------- */
.sf-overlay { position: fixed; inset: 0; background: rgba(42,35,32,.45); backdrop-filter: blur(2px);
  z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.sf-overlay.open { opacity: 1; pointer-events: auto; }
.sf-panel { position: fixed; top: 0; right: 0; height: 100%; width: min(440px, 92vw);
  background: var(--bg); z-index: 61; box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .26s ease; overflow-y: auto; }
.sf-panel.open { transform: translateX(0); }
.sf-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 2; }
.sf-top b { font-family: "Fraunces", serif; font-size: 1.05rem; }
.sf-close { border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 999px;
  cursor: pointer; font-size: 16px; color: var(--ink-soft); }
.sf-hero { height: 150px; background: linear-gradient(135deg, var(--brand), #F2934C);
  position: relative; display: grid; place-items: center; }
.sf-ribbon { position: absolute; top: 12px; left: 12px; }
.sf-photo { width: 92px; height: 92px; border-radius: 999px; border: 4px solid var(--bg);
  background: var(--surface-2); display: grid; place-items: center; margin: -46px auto 0; position: relative;
  font-family: "Fraunces", serif; font-size: 2rem; color: var(--brand); overflow: hidden; }
.sf-photo.has { background: linear-gradient(135deg,#E2552B,#F2934C); color:#fff; }
.sf-body { padding: 8px 22px 30px; text-align: center; }
.sf-body h3 { margin: 10px 0 2px; }
.sf-story { font-size: .9rem; color: var(--ink-soft); margin: 12px 0 18px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.sf-story.empty { color: var(--ink-faint); font-style: italic; border-style: dashed; }
.sf-menu { text-align: left; display: grid; gap: 8px; margin-bottom: 18px; }
.sf-item { display: flex; justify-content: space-between; gap: 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.sf-item .nm { font-weight: 600; font-size: .9rem; }
.sf-item .pr { font-weight: 700; color: var(--brand-dark); }
.sf-order { width: 100%; }
.sf-order:disabled { background: var(--line-2); box-shadow: none; cursor: not-allowed; color: #fff; }
.sf-note { font-size: .8rem; color: var(--ink-faint); margin-top: 10px; }

/* toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .9rem;
  font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 80; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
