/* seli — order flow (/comanda), demo payment (/plata-demo), order status (/comanda/:token). Mobile-first. */

.page-flow { background: var(--paper); }
body.is-locked { overflow: hidden; }
.flow-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.flow { padding: 20px 0 56px; }
.flow__in { display: grid; gap: 40px; }
.flow__main { width: 100%; max-width: 560px; margin: 0 auto; min-width: 0; }
.flow__aside { display: none; }
@media (min-width: 1024px) {
  .flow { padding: 44px 0 96px; }
  .flow__in { grid-template-columns: minmax(0, 560px) 360px; justify-content: center; gap: 88px; align-items: start; }
  .flow__main { margin: 0; }
  .flow__aside { display: block; position: sticky; top: 32px; }
}

/* progress */
.progress { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 30px; }
.progress__step { display: grid; gap: 8px; }
.progress__bar { height: 4px; border-radius: 4px; background: var(--line-2); position: relative; overflow: hidden; }
.progress__bar::after { content: ''; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s var(--ease); }
.progress__step.is-done .progress__bar::after, .progress__step.is-current .progress__bar::after { transform: scaleX(1); }
.progress__step.is-current .progress__bar::after { background: var(--rec); }
.progress__label { font-size: .75rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.progress__step.is-current .progress__label, .progress__step.is-done .progress__label { color: var(--ink); }

/* step content */
.stepc__title { font-size: clamp(2.1rem, 9.5vw, 3rem); line-height: 1; letter-spacing: -0.04em; outline: none; }
.stepc__lede { margin: 10px 0 28px; color: var(--muted); font-size: 1rem; max-width: 42ch; }
.stepc__actions { margin-top: 28px; display: grid; gap: 12px; }
.stepc__actions--two { grid-template-columns: 1fr; }
@media (min-width: 480px) { .stepc__actions--two { grid-template-columns: 1fr 1fr; } }
.stepc__assure { text-align: center; font-size: .875rem; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; padding: 0 4px; border: 0; background: none; color: var(--muted); font-weight: 500; font-size: .9375rem; }
.back:hover { color: var(--ink); }

/* photo picker */
.drop {
  display: flex; align-items: center; gap: 16px; min-height: 84px; padding: 16px 18px; border-radius: var(--radius);
  border: 1.5px dashed #BDB7AB; background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.drop:hover, .drop.is-over { border-color: var(--ink); background: #FBFAF7; }
#f-photos:focus-visible + .drop { outline: 3px solid var(--rec); outline-offset: 3px; }
.drop.is-full { opacity: .6; cursor: not-allowed; }
.drop__ico { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.drop__ico svg { width: 22px; height: 22px; }
.drop__t { display: grid; gap: 2px; font-size: .8125rem; color: var(--muted); line-height: 1.4; }
.drop__t b { font-size: 1rem; color: var(--ink); font-weight: 600; }
.thumbs { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumbs:empty { display: none; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__x { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: start end; padding: 5px; }
.thumb__x span { width: 26px; height: 26px; border-radius: 50%; background: rgba(15, 15, 15, .78); color: #fff; display: grid; place-items: center; font-size: 18px; line-height: 1; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7); }
.thumb__x:hover span { background: var(--rec); }

/* invoice */
.check--row { margin-top: 18px; }
.company { margin-top: 8px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }

/* order summary */
.summary { margin: 26px 0 14px; padding: 20px 18px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.summary__title { font-family: var(--font-body); font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.summary__list { margin: 12px 0 0; display: grid; gap: 0; }
.summary__list > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.summary__list dt { color: var(--muted); flex: none; }
.summary__list dd { margin: 0; text-align: right; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; font-weight: 600; }
.summary__amount { font-family: var(--font-head); font-weight: 800; font-size: 1.875rem; letter-spacing: -0.035em; }
.summary__vat { text-align: right; font-size: .8125rem; color: var(--muted); }

/* aside card (desktop) */
.aside-card { border-radius: 26px; padding: 22px; display: grid; gap: 22px; justify-items: center; }
.aside-card__phone .phone { --pw: 220px; }
.aside-card__txt { width: 100%; }
.aside-card__name { font-weight: 600; }
.aside-card__price { margin-top: 4px; }
.aside-card__price b { font-family: var(--font-head); font-size: 2rem; letter-spacing: -0.035em; font-weight: 800; }
.aside-card__list { list-style: none; margin-top: 14px; border-top: 1px solid var(--line-ink); }
.aside-card__list li { padding: 10px 0 10px 20px; border-bottom: 1px solid var(--line-ink); font-size: .9375rem; position: relative; color: var(--on-ink); }
.aside-card__list li::before { content: ''; position: absolute; left: 2px; top: 1.05em; width: 7px; height: 7px; border-radius: 50%; background: var(--rec); }

/* upload overlay */
.overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; padding: 16px; background: rgba(15, 15, 15, .55); }
@media (min-width: 640px) { .overlay { place-items: center; } }
.overlay__card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 24px; padding: 26px 22px 22px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); display: grid; gap: 10px; }
.overlay__title { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1.1; }
.overlay__sub { font-size: .9375rem; font-variant-numeric: tabular-nums; min-height: 1.4em; }
.overlay__actions { display: grid; gap: 10px; margin-top: 6px; }
.meter { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin-top: 6px; }
.meter__fill { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .2s linear; }

/* ---------- demo payment ---------- */
.pay { max-width: 480px; margin: 0 auto; }
.pay__label { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pay__title { margin-top: 10px; font-size: clamp(2.1rem, 9.5vw, 3rem); letter-spacing: -0.04em; }
.pay__lede { margin-top: 10px; color: var(--muted); }
.pay__card { margin-top: 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.pay__row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.pay__row dt { color: var(--muted); flex: none; }
.pay__row dd { margin: 0; text-align: right; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.pay__card dl { margin: 0; }
.pay__total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 20px 20px; }
.pay__total span:first-child { font-weight: 600; }
.pay__amount { font-family: var(--font-head); font-weight: 800; font-size: 2.25rem; letter-spacing: -0.04em; line-height: 1; }
.pay__demo { margin-top: 16px; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: #FFF6E5; border: 1px solid #F1DDB4; color: #6B4A00; font-size: .875rem; line-height: 1.45; }
.pay__demo b { font-weight: 600; }
.pay__actions { margin-top: 20px; display: grid; gap: 10px; }

/* ---------- status page ---------- */
.status { max-width: 640px; margin: 0 auto; }
.status__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: .875rem; color: var(--muted); }
.status__title { margin-top: 12px; font-size: clamp(2.3rem, 10.5vw, 3.6rem); letter-spacing: -0.045em; line-height: .98; }
.status__lede { margin-top: 12px; color: var(--muted); max-width: 44ch; }
.status__paid { margin-top: 20px; }
.status__paid p + p { margin-top: 6px; }
.linkbox { margin-top: 12px; display: flex; gap: 8px; align-items: stretch; }
.linkbox .input { min-height: 44px; font-size: .875rem; padding: 10px 12px; background: var(--paper); }

.pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: var(--ink); color: var(--paper); }
.pill .rec-dot { width: 8px; height: 8px; }
.pill--ok { background: var(--ok); }
.pill--light { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }

.clock { margin-top: 26px; border-radius: 24px; padding: 20px 20px 18px; }
.clock__label { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--on-ink-muted); display: flex; align-items: center; gap: 8px; }
.clock__digits { margin-top: 8px; font-family: var(--font-head); font-weight: 800; font-size: clamp(3.2rem, 17vw, 5.5rem); line-height: .95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.clock__digits .sep { color: var(--on-ink-muted); }
.clock__when { margin-top: 10px; color: var(--on-ink-muted); font-size: .9375rem; }
.clock__track { margin-top: 16px; height: 4px; border-radius: 4px; background: var(--line-ink); overflow: hidden; }
.clock__track i { display: block; height: 100%; background: var(--rec); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

.delivered { margin-top: 26px; border-radius: 28px; padding: 22px 16px 20px; display: grid; justify-items: center; gap: 18px; }
.delivered .phone { --pw: min(76vw, 300px); }
.delivered__actions { width: 100%; max-width: 360px; display: grid; gap: 10px; }
.delivered__meta { font-size: .8125rem; color: var(--on-ink-muted); text-align: center; }

.remake { margin-top: 18px; padding: 20px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.remake__title { font-family: var(--font-head); font-weight: 800; font-size: 1.375rem; letter-spacing: -0.03em; line-height: 1.1; }
.remake__p { margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.remake form { margin-top: 14px; display: grid; gap: 10px; }
.remake .textarea { min-height: 110px; }
.remake__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.remake__actions { display: grid; gap: 10px; }
@media (min-width: 480px) { .remake__actions { grid-template-columns: 1fr auto; } }

.timeline { margin-top: 30px; }
.timeline__title { font-family: var(--font-body); font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tl { list-style: none; position: relative; }
.tl__item { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 11px 0; min-height: 48px; }
.tl__item::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: -11px; width: 2px; background: var(--line-2); }
.tl__item:last-child::before { display: none; }
.tl__item.is-done::before { background: var(--ink); }
.tl__dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--paper); display: grid; place-items: center; position: relative; z-index: 1; }
.tl__item.is-done .tl__dot { background: var(--ink); border-color: var(--ink); }
.tl__item.is-done .tl__dot::after { content: ''; width: 10px; height: 6px; border-left: 2px solid var(--paper); border-bottom: 2px solid var(--paper); transform: rotate(-45deg) translate(1px, -1px); }
.tl__item.is-current .tl__dot { border-color: var(--rec); background: var(--surface); }
.tl__item.is-current .tl__dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--rec); animation: rec-pulse 1.6s ease-in-out infinite; }
.tl__t { font-weight: 600; line-height: 1.3; padding-top: 3px; }
.tl__sub { display: block; font-weight: 400; font-size: .875rem; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.tl__when { font-size: .8125rem; color: var(--muted); padding-top: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl__item.is-todo .tl__t { color: var(--muted); font-weight: 500; }

.brief { margin-top: 26px; border-top: 1px solid var(--line); }
.brief summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 56px; cursor: pointer; font-weight: 600; }
.brief summary::-webkit-details-marker { display: none; }
.brief summary::after { content: '+'; font-size: 1.5rem; font-weight: 400; color: var(--muted); transition: transform .2s; }
.brief[open] summary::after { transform: rotate(45deg); }
.brief dl { margin: 0 0 12px; display: grid; gap: 14px; }
.brief dt { font-size: .8125rem; color: var(--muted); font-weight: 600; }
.brief dd { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-line; }

.status__help { margin-top: 30px; font-size: .875rem; color: var(--muted); }
.error-block { max-width: 520px; margin: 40px auto; text-align: left; }
.error-block h1 { font-size: clamp(2rem, 9vw, 3rem); letter-spacing: -0.04em; }
.error-block p { margin-top: 12px; color: var(--muted); }
.error-block .btn { margin-top: 22px; }

/* ---------- daily cap: full state (/comanda) ---------- */
.full { padding: 8px 0 24px; }
.full__label { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.full__title { margin-top: 12px; font-size: clamp(2.1rem, 9.5vw, 3rem); letter-spacing: -0.04em; line-height: 1; outline: none; }
.full__p { margin: 14px 0 26px; color: var(--muted); max-width: 42ch; }

/* ---------- payment states ---------- */
.pay-cancelled { margin: -12px 0 22px; }
#withdrawal-wrap { margin-top: 2px; }
.status__confirming { margin-top: 20px; }
.status__pay .alert { margin-top: 12px; }

.pay-trust { margin-top: 10px; text-align: center; font-size: .8125rem; color: var(--muted); }
