/* Bibo's Crafts: shoppers' account page (builds on styles.css).
   Deliberately different from the admin door: mirrored (form left, art right), her velvet
   board instead of blush, filled rounded fields, and the Shelf Squad instead of the crew. */
body.acct-page { padding-bottom: 0; }
.acct-loading { padding: 40px; color: var(--mauve); }
.small { font-size: .86rem; }
.muted { color: var(--mauve); }

/* ---------------- sign in / create account ---------------- */
.acct-auth { display: grid; min-height: 100vh; min-height: 100svh; }
.acct-panel { order: 2; display: flex; flex-direction: column; padding: 18px 20px 36px; background: var(--cream); }
.acct-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.acct-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.acct-brand img { width: 44px; height: 44px; margin: -3px -2px -3px -4px; object-fit: contain; border-radius: 10px; }
.acct-brand .wordmark { font-size: 1.3rem; }
.acct-card { width: 100%; max-width: 430px; margin: auto; }

.acct-art { order: 1; position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 44svh; padding: 18px 16px 0; overflow: hidden; color: #F5EFFA;
  background:
    radial-gradient(70% 55% at 30% 18%, rgba(230,215,255,.22), transparent 60%),
    radial-gradient(60% 60% at 90% 85%, rgba(0,0,0,.28), transparent 70%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 3px, transparent 3px 7px),
    linear-gradient(160deg, #7B55B5 0%, #63408F 45%, #45296E 100%); }   /* the lilac grade, deep end */
.acct-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 14px; z-index: 3;
  background: radial-gradient(circle at 50% 100%, var(--cream) 13.5px, transparent 14px) 0 0 / 28px 14px repeat-x; }
.acct-word { position: absolute; left: 0; right: 0; top: 10%; z-index: 0; text-align: center; white-space: nowrap; pointer-events: none;
  font: italic 600 clamp(3.2rem, 13vw, 9rem)/.9 var(--serif); letter-spacing: -.045em; color: rgba(251,239,230,.92);
  text-shadow: 0 0 .05em rgba(255,255,255,.9), 0 0 .25em rgba(255,182,200,.55), 0 0 .7em rgba(255,140,170,.35); }
.acct-word.swap { animation: big-in .6s cubic-bezier(.2,.8,.2,1) both; }
.acct-squad { position: relative; z-index: 1; width: min(100%, 560px); align-self: center; }
.acct-caption { position: relative; z-index: 4; text-align: center; font: italic 500 .9rem/1.3 var(--serif); color: rgba(251,239,230,.78); padding: 4px 0 22px; display: none; }

/* the squad */
.squad { position: relative; width: 100%; aspect-ratio: 10 / 8.8; }
.sq-char { position: absolute; transform-origin: 50% 100%; transform: rotate(calc(var(--rot) + var(--lean, 0deg))); transition: transform .5s cubic-bezier(.3,1.3,.5,1); }
.sq-body { position: relative; width: 100%; filter: drop-shadow(0 12px 14px rgba(14,8,24,.45)); animation: sq-float 4.4s ease-in-out infinite; animation-delay: var(--d); }
.sq-body img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.sq-face { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
@keyframes sq-float { 50% { transform: translateY(-4px); } }
.sq-shelf { position: absolute; left: -2%; right: -2%; bottom: 1.5%; height: 6.5%; border-radius: 8px; z-index: 0;
  background: linear-gradient(#D7AB78, #B98856 55%, #9A6C3E); box-shadow: 0 10px 18px rgba(14,8,24,.45), inset 0 2px 0 rgba(255,255,255,.25); }
.squad .sclera { fill: #fff; stroke: rgba(42,29,54,.25); stroke-width: .35; }
.squad .pupil { fill: #2A1D36; transition: transform .12s ease-out; }
.squad .glint { fill: #fff; transition: transform .12s ease-out; }
.squad .lid, .squad .lid-happy { fill: none; stroke: #2A1D36; stroke-width: 1.1; stroke-linecap: round; opacity: 0; }
.squad .mouth { fill: none; stroke: #2A1D36; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.squad .mouth[d$="z"], .squad .mouth[d*=" a"] { fill: #2A1D36; }
.squad .eye-open { transform-box: fill-box; transform-origin: center; transition: transform .14s ease; }
.squad .eye.blink .eye-open { transform: scaleY(.08); }
.sq-char.bop .sq-body { animation: sq-bop .28s ease; }
@keyframes sq-bop { 50% { transform: scale(1.03, .96); } }
.squad.closed .eye .eye-open { transform: scaleY(.05); }
.squad.closed .eye .lid { opacity: 1; transition: opacity .1s .08s; }
.squad.closed.peek .sq-char[data-who="rosie"] .eye[data-n="1"] .eye-open { transform: none; }
.squad.closed.peek .sq-char[data-who="rosie"] .eye[data-n="1"] .lid { opacity: 0; }
.squad.closed .sq-char[data-who="bo"] { --lean: 10deg !important; }
.squad.oops .sq-body { animation: sq-shake .55s cubic-bezier(.36,.07,.19,.97) both; animation-delay: var(--d); }
@keyframes sq-shake { 15%, 55% { transform: translateX(-6px) rotate(-2deg); } 35%, 75% { transform: translateX(6px) rotate(2deg); } }
.squad.happy .sq-body { animation: sq-hop .7s cubic-bezier(.3,1.6,.5,1) 2; animation-delay: var(--d); }
@keyframes sq-hop { 40% { transform: translateY(-22px) rotate(-3deg); } 70% { transform: translateY(0) scale(1.03, .95); } }
.squad.happy .eye .eye-open { transform: scaleY(.05); }
.squad.happy .eye .lid-happy { opacity: 1; }
.sq-hearts { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.sq-heart { position: absolute; bottom: 18%; font-size: 26px; line-height: 1; transform: scale(var(--s)); opacity: 0; animation: sq-heart 2.2s ease-out forwards; text-shadow: 0 2px 6px rgba(14,8,24,.35); }
@keyframes sq-heart { 10% { opacity: 1; } 100% { transform: translate(14px, -320px) scale(var(--s)) rotate(var(--r)); opacity: 0; } }

/* form */
.a-kicker { font: 700 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--velvet); margin-bottom: 10px; }
.a-title { font: 600 clamp(2rem, 6vw, 2.7rem)/1.05 var(--serif); letter-spacing: -.01em; }
.a-title em { display: inline; font-style: italic; color: var(--velvet); }
.a-sub { color: var(--mauve); margin: 8px 0 20px; }
.a-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 20px; }
.a-tabs button { height: 44px; border-radius: 999px; border: 2px solid var(--velvet); background: transparent; color: var(--velvet); font: 700 .92rem/1 var(--sans); cursor: pointer; transition: background .2s, color .2s; }
.a-tabs button[aria-selected="true"] { background: var(--velvet); color: var(--cream); }
.a-field { display: block; margin-bottom: 14px; }
.a-field > span:first-child { display: block; font: 700 .86rem/1.2 var(--sans); margin-bottom: 6px; }
.a-field small { font-weight: 500; color: var(--mauve); }
.a-field input { width: 100%; height: 50px; padding: 0 16px; border-radius: 16px; border: 2px solid transparent; background: var(--blush); color: var(--ink); font: 500 1rem/1 var(--sans); transition: border-color .2s, background .2s; }
.a-field input::placeholder { color: #B58C95; font-weight: 400; }
.a-field input:focus { outline: none; border-color: var(--velvet); background: var(--paper); }
.a-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 50px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--mauve); cursor: pointer; display: grid; place-items: center; }
.pw-eye svg, .a-done-mark svg, .acct-bag h2 svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye:hover { color: var(--velvet); }
.a-row { display: flex; justify-content: space-between; margin: -4px 0 4px; }
.a-link { background: none; border: 0; padding: 6px 0; color: var(--velvet); font: 700 .9rem/1 var(--sans); cursor: pointer; text-decoration: none; }
.a-msg { min-height: 1.3em; margin: 4px 0 12px; font: 700 .9rem/1.35 var(--sans); color: var(--velvet); }
.a-msg[data-mood="good"] { color: #2F6B3A; }
.a-submit { height: 52px; }
.a-guest { margin-top: 18px; text-align: center; }
.a-guest a { color: var(--mauve); font-weight: 500; text-decoration: none; border-bottom: 1px dashed currentColor; }
.a-guest a:hover { color: var(--velvet); }
.stitch-meter { display: flex; align-items: center; gap: 12px; margin: -6px 0 14px; font: 500 .82rem/1.2 var(--sans); color: var(--mauve); }
.stitch-meter svg { width: 110px; flex: 0 0 auto; }
.stitch-meter .st { fill: none; stroke: var(--stone); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s; }
.stitch-meter[data-level="low"] .st.on { stroke: #DD1864; }
.stitch-meter[data-level="mid"] .st.on { stroke: #E2A73C; }
.stitch-meter[data-level="high"] .st.on { stroke: #2F6B3A; }
.a-done { text-align: center; }
.a-done .a-hint { margin: -10px 0 18px; font-size: .92rem; color: var(--mauve); }
.a-done .btn + .btn, .a-done .a-msg + .btn { margin-top: 10px; }
.a-done-mark { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--blush); color: var(--velvet); }

@media (min-width: 900px) {
  .acct-auth { grid-template-columns: 1fr 1.08fr; height: 100vh; height: 100svh; min-height: 0; overflow: hidden; }
  .acct-panel { order: 1; height: 100%; overflow-y: auto; padding: clamp(16px, 3.4vh, 28px) 40px clamp(16px, 3vh, 30px); }
  .acct-panel-top { margin-bottom: 0; }
  .acct-art { order: 2; min-height: 0; height: 100%; padding: 0 30px; }
  .acct-art::after { right: auto; top: 0; bottom: 0; left: -1px; width: 16px; height: auto;
    background: radial-gradient(circle at 0% 50%, var(--cream) 15.5px, transparent 16px) 0 0 / 16px 32px repeat-y; }
  .acct-word { top: clamp(6%, 12vh, 16%); font-size: clamp(4rem, min(8.5vw, 15vh), 8.5rem); }
  .acct-squad { width: min(100%, 600px, calc((100svh - 150px) * 1.19)); }
  .acct-caption { display: block; }
  .a-title { font-size: clamp(1.8rem, 5.4vh, 2.7rem); }
  .a-sub { margin: clamp(4px, .8vh, 8px) 0 clamp(10px, 2.4vh, 20px); }
  .a-tabs { margin-bottom: clamp(10px, 2.4vh, 20px); }
  .a-field { margin-bottom: clamp(8px, 1.8vh, 14px); }
  .a-field input { height: clamp(42px, 6vh, 50px); }
  .a-submit { height: clamp(44px, 6.4vh, 52px); }
  .a-guest { margin-top: clamp(10px, 2vh, 18px); }
}

/* ---------------- your loops (signed in) ---------------- */
.acct-top { position: sticky; top: 0; z-index: 20; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--stone); }
.acct-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.acct-top .acct-brand { min-width: 0; }
.acct-top .acct-brand .wordmark { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-nav { display: flex; align-items: center; gap: 12px; }
.acct-dash { padding-top: 30px; padding-bottom: 60px; }
.acct-hello { margin-bottom: 24px; }
.acct-grid { display: grid; gap: 18px; }
.acct-side { display: grid; gap: 18px; align-content: start; }
.acct-box { background: var(--paper); border-radius: 24px; padding: 22px; box-shadow: inset 0 0 0 1px var(--stone); }
.acct-box h2 { display: flex; align-items: center; gap: 8px; font: 600 1.35rem/1.2 var(--serif); margin-bottom: 12px; }
.acct-bag p { color: var(--mauve); margin-bottom: 14px; }
.acct-empty { text-align: center; padding: 24px 0 10px; display: grid; gap: 10px; justify-items: center; color: var(--mauve); }
.acct-empty-mark { font-size: 2.4rem; color: var(--lily); }
.acct-order { margin: 0 0 12px; padding: 14px; border: 1px solid var(--stone); border-radius: 18px; background: var(--cream); box-shadow: 0 8px 24px rgba(42,29,54,.04); }
.acct-order:last-child { margin-bottom: 0; }
.acct-order:first-child { border-top: 1px solid var(--stone); }
.acct-order-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.acct-order-top h3 { font: 600 1.15rem/1 var(--serif); letter-spacing: .03em; }
.acct-order-items { color: var(--mauve); margin: 6px 0 8px; }
.acct-order-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .92rem; }
.chip-pay { padding: 4px 10px; border-radius: 999px; font: 700 .76rem/1.2 var(--sans); }
.chip-pay.ok { background: #DDF0D8; color: #23542C; }
.chip-pay.warn { background: var(--butter); color: #2A1D36; }
.chip-pay.muted { background: var(--stone); color: var(--ink); }
.acct-track { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.acct-track li { position: relative; text-align: center; font: 600 .7rem/1.2 var(--sans); color: var(--mauve); padding-top: 22px; }
.acct-track li span { position: absolute; top: 3px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--stone); z-index: 1; }
.acct-track li::before { content: ""; position: absolute; top: 9px; left: -50%; right: 50%; height: 3px; background: var(--stone); }
.acct-track li:first-child::before { display: none; }
.acct-track li.done, .acct-track li.now { color: var(--ink); }
.acct-track li.done span { background: var(--velvet); box-shadow: none; }
.acct-track li.done::before, .acct-track li.now::before { background: var(--velvet); }
.acct-track li.now span { background: var(--butter); box-shadow: 0 0 0 3px var(--velvet); }
.acct-cancelled { margin-top: 10px; color: var(--mauve); font-style: italic; }
.acct-cancel { margin-top: 12px; }
.acct-payment { margin-top: 12px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--stone); }
.acct-payment summary { min-height: 52px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; font-weight: 800; }
.acct-payment summary::-webkit-details-marker { display: none; }
.acct-payment summary::after { content: "+"; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; display: grid; place-items: center; background: var(--stone); }
.acct-payment[open] summary::after { content: "−"; }
.acct-payment summary small { margin-left: auto; color: var(--mauve); font: 700 .72rem/1.2 var(--sans); }
.acct-payment-body { padding: 0 12px 12px; }
.acct-pay-instruction { margin: 0 0 10px; color: var(--mauve); line-height: 1.45; }
.acct-mpesa-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.acct-mpesa-form label { min-width: 0; display: grid; gap: 5px; font-size: .78rem; font-weight: 700; }
.acct-mpesa-form input { width: 100%; box-sizing: border-box; min-height: 44px; border: 1px solid var(--stone); border-radius: 10px; background: var(--cream); color: var(--ink); padding: 8px 10px; text-transform: uppercase; }
.acct-submitted-code { margin: 8px 0 0; color: var(--mauve); font-size: .82rem; }
.acct-payment-actions { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--stone); }
.acct-wa { width: 100%; box-sizing: border-box; text-align: center; }
.form-error { color: var(--velvet); font-weight: 700; font-size: .9rem; min-height: 1.1em; margin: 4px 0 8px; }
@media (min-width: 900px) {
  .acct-grid { grid-template-columns: 1.5fr 1fr; align-items: start; }
}
@media (max-width: 420px) {
  .acct-top-inner { gap: 6px; min-height: 64px; }
  .acct-top .acct-brand { gap: 6px; }
  .acct-top .acct-brand img { width: 34px; height: 34px; }
  .acct-top .acct-brand .wordmark { font-size: 1rem; }
  .acct-nav { gap: 6px; }
  .acct-nav .a-link { display: none; }
  .acct-box { padding: 14px; border-radius: 18px; }
  .acct-order { padding: 12px 10px; margin-left: -2px; margin-right: -2px; }
  .acct-order-top { align-items: start; }
  .acct-order-top h3 { font-size: 1.08rem; }
  .acct-order-items { margin: 8px 0; line-height: 1.4; }
  .acct-order-meta { gap: 6px 8px; }
  .acct-order-meta > .muted { flex-basis: 100%; }
  .acct-track { margin-top: 10px; }
  .acct-track li { font-size: .54rem; line-height: 1.12; padding-top: 19px; }
  .acct-track li span { width: 12px; height: 12px; margin-left: -6px; }
  .acct-track li::before { top: 8px; height: 2px; }
  .acct-payment summary { min-height: 48px; padding: 8px 10px; }
  .acct-payment summary::after { width: 26px; height: 26px; flex-basis: 26px; }
  .acct-payment summary small { font-size: .66rem; }
  .acct-payment-body { padding: 0 10px 10px; }
  .acct-mpesa-form { grid-template-columns: 1fr; }
  .acct-mpesa-form .btn { width: 100%; min-height: 44px; }
  .acct-wa { width: 100%; box-sizing: border-box; text-align: center; }
  .acct-cancel { width: 100%; }
  .a-two { grid-template-columns: 1fr; gap: 0; }
}
[hidden] { display: none !important; }

/* short laptop screens: keep Create account on one screen */
@media (min-width: 900px) and (max-height: 780px) {
  .a-kicker { display: none; }
  .a-sub { margin-bottom: 10px; }
  .a-field > span:first-child { margin-bottom: 4px; }
  .stitch-meter { margin: -4px 0 8px; }
  .a-msg { margin: 2px 0 8px; }
}
