/* «Заявки» и «Форма заказа» в приложении (кондитер). Публичная страница — client-form.css. */

/* ---------- список заявок ---------- */
.rq-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.rq-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 800; font-size: 14.5px; color: var(--ink2); background: var(--paper); border: 1px solid var(--line); }
.rq-tabs a .num { font-size: 12.5px; color: var(--muted); }
.rq-tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rq-tabs a.on .num { color: color-mix(in srgb, #fff 70%, transparent); }
.rq-list { padding-top: 6px; padding-bottom: 6px; }
.rq-row { align-items: flex-start; }
.rq-row:hover .rm b { color: var(--acc); }
.rq-date { width: 52px; height: 56px; flex: none; border-radius: 14px; background: var(--paper2); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.rq-date b { font-size: 21px; font-weight: 800; }
.rq-date small { font-size: 12px; font-weight: 700; color: var(--muted); }
.rq-row.new .rq-date { background: var(--accs); color: var(--acch); }
.rq-row.new .rq-date small { color: var(--acch); }
.rq-meta { display: flex !important; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.rq-meta small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.rq-meta .chip { display: inline-flex !important; height: 24px; font-size: 12px; }
.rq-meta small { display: inline !important; }
@media (max-width: 599px) { .rq-row .rr small { display: none; } .rq-row .rr { font-size: 14px; } }

/* ---------- карточка заявки ---------- */
.rq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.rq-when { font-size: 13.5px; font-weight: 600; }
.rq-grid { display: grid; gap: 16px; align-items: start; }
.rq-grid .card + .card { margin-top: 16px; }
@media (min-width: 1100px) { .rq-grid { grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); gap: 20px; } }
.rq-cake-top { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.rq-cake-top h2 { font-family: var(--ff-head); font-weight: 600; font-size: 22px; }
.rq-cake-top p { font-size: 14px; margin-top: 2px; }
.rq-date-big { font-weight: 800; font-size: 13px; color: var(--acc); text-transform: uppercase; letter-spacing: .5px; }
.rq-tiers { width: 104px; flex: none; }
.rq-tiers rect { fill: var(--secs); stroke: var(--secink); stroke-width: 1.2; }
.rq-tiers rect.t0 { fill: var(--accs); stroke: var(--acc); }
.rq-tiers rect.t2 { fill: #fff; }
.rq-tiers rect.plate { fill: var(--ink); stroke: none; }
.rq-cake-ic { width: 72px; height: 72px; border-radius: 22px; background: var(--accs); color: var(--acc); display: grid; place-items: center; flex: none; }
.rq-kv { gap: 8px 18px; }
.rq-kv dd { overflow-wrap: anywhere; }
.rq-pm { font-weight: 600; font-size: 13px; }
.rq-wishes { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--secs); color: var(--ink); }
.rq-wishes b { display: block; font-size: 13px; color: var(--secink); margin-bottom: 2px; }
.rq-wishes p { white-space: pre-line; font-size: 14.5px; }
.rq-consent summary { display: inline; color: var(--acc); cursor: pointer; font-size: 13px; }
.rq-consent span { display: block; margin-top: 4px; font-weight: 500; font-size: 13px; color: var(--muted); }
.rq-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.rq-photo { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--paper2); border: 1px solid var(--line); }
.rq-photo img { width: 100%; height: 100%; object-fit: cover; }
.rq-photo.heic { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rq-side .lead { font-size: 14px; margin: 2px 0 14px; }
.rq-contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-text { margin-top: 14px; }
.rq-text .form-actions form { margin: 0; }
.rq-reject summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.rq-reject summary::-webkit-details-marker { display: none; }
.rq-reject summary::after { content: "›"; font-size: 22px; color: var(--muted); transform: rotate(90deg); transition: transform .15s; }
.rq-reject[open] summary::after { transform: rotate(-90deg); }
.rq-reject .form { margin-top: 12px; }
.rq-done h2 { margin-bottom: 4px; }
.rq-done p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.rq-done.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: color-mix(in srgb, var(--oks) 45%, var(--paper)); }
.rq-reason { color: var(--ink) !important; font-weight: 700; }
.of-ta { min-height: 80px; padding: 12px 14px; line-height: 1.4; resize: vertical; }

/* ---------- настройки формы ---------- */
.of-share { display: flex; flex-direction: column; gap: 18px; margin-bottom: 16px; }
.of-share-main { flex: 1; min-width: 0; }
.of-share .lead { margin: 4px 0 12px; font-size: 14px; }
.of-state { margin-bottom: 8px; }
.of-qr { display: flex; align-items: center; gap: 12px; }
.of-qr img { width: 148px; height: 148px; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 4px; }
.of-qr-acts { display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 760px) { .of-share { flex-direction: row; align-items: center; } .of-qr { flex-direction: column; } .of-qr-acts { flex-direction: row; } }
.of-form .card + .card { margin-top: 16px; }
.of-switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; min-height: 44px; }
.of-switch input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--acc); flex: none; }
.of-switch b { display: block; font-weight: 800; font-size: 15.5px; }
.of-switch small { display: block; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.of-slug { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); overflow: hidden; }
.of-slug span { flex: none; display: flex; align-items: center; padding: 0 2px 0 12px; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.of-slug .input { border: 0; border-radius: 0; padding-left: 2px; min-width: 0; }
.of-slug:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.of-slug .input:focus { box-shadow: none; }
.of-modes { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .of-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.of-opt { position: relative; cursor: pointer; }
.of-opt input { position: absolute; opacity: 0; }
.of-opt > span { display: flex; flex-direction: column; gap: 3px; height: 100%; min-height: 44px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); }
.of-opt b { font-weight: 800; font-size: 14.5px; }
.of-opt small { color: var(--muted); font-size: 13px; }
.of-opt input:checked + span { border-color: var(--acc); background: color-mix(in srgb, var(--accs) 50%, var(--paper)); }
.of-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--acc) 55%, transparent); outline-offset: 2px; }
.of-decor { display: grid; gap: 14px; margin-top: 10px; }
@media (min-width: 600px) { .of-decor { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .of-decor { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.of-form .err:empty { display: none; }
.of-rec { border-top: 1px solid var(--line); }
.of-rec:first-child { border-top: 0; }
.of-rec summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 0; cursor: pointer; }
.of-rec summary::-webkit-details-marker { display: none; }
.of-rec summary .rm { flex: 1; min-width: 0; }
.of-rec summary .rm b { display: block; font-weight: 800; }
.of-rec summary .rm span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.of-rec summary .chev { color: var(--muted); transition: transform .15s; }
.of-rec[open] summary .chev { transform: rotate(180deg); }
.of-rec-ph { width: 48px; height: 48px; border-radius: 12px; background: var(--paper2); color: var(--muted); display: grid; place-items: center; overflow: hidden; flex: none; }
.of-rec.on .of-rec-ph { background: var(--accs); color: var(--acc); }
.of-rec-ph img { width: 100%; height: 100%; object-fit: cover; }
.of-rec-form { padding: 4px 0 18px 60px; max-width: 720px; }
@media (max-width: 599px) { .of-rec-form { padding-left: 0; } }
.of-file { padding: 10px 14px; font-size: 14px; }

/* бейдж в меню */
.nav a .badge, .list-links .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--acc); color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.list-links .badge + .go { margin-left: 8px; }
.bn a { position: relative; }
.bn-dot { position: absolute; top: 10px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 2px var(--paper); }
.of-share, .of-form, #recipes { max-width: 1040px; }
/* фаза 2: оформление, зоны, встраивание, статистика */
.of-wide { max-width: 1040px; }
.of-color { display: flex; gap: 8px; align-items: stretch; }
.of-color input[type=color] { width: 52px; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); padding: 4px; cursor: pointer; flex: none; }
.of-brand { display: grid; gap: 16px; margin-top: 8px; }
@media (min-width: 760px) { .of-brand { grid-template-columns: 1fr 1fr; } }
.of-brand-item { display: flex; gap: 14px; align-items: flex-start; }
.of-brand-prev { width: 84px; height: 84px; flex: none; border-radius: 16px; overflow: hidden; background: var(--paper2); display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); }
.of-brand-prev.cover { width: 140px; height: 84px; }
.of-brand-prev img { width: 100%; height: 100%; object-fit: cover; }
.of-brand-form { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.of-add { margin-top: 12px; }
.of-add > summary { list-style: none; display: inline-flex; }
.of-add > summary::-webkit-details-marker { display: none; }
.of-add[open] > summary { margin-bottom: 8px; }
.of-add .of-rec-form { padding-left: 0; }
.of-zone .of-rec-ph { background: var(--secs); color: var(--secink); }
.of-snippet + .of-snippet { margin-top: 14px; }
.of-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; min-height: 64px; padding: 10px 12px; line-height: 1.45; resize: none; }
.of-snippet .copyline { align-items: flex-start; }

.st-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.st-funnel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .st-funnel { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.st-funnel .card { margin: 0; }
.st-funnel b { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; }
.st-funnel span { display: block; color: var(--muted); font-weight: 700; font-size: 13.5px; }
.st-funnel small { display: block; margin-top: 6px; font-weight: 800; color: var(--acch); font-size: 13px; }
.st-funnel .card.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.st-funnel .card.dark span { color: color-mix(in srgb, #fff 70%, transparent); }
.st-funnel .card.dark small { color: var(--sec); }
.st-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; align-items: end; height: 160px; margin-top: 14px; }
.st-bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.st-bar i { display: block; border-radius: 6px 6px 2px 2px; background: var(--accs); min-height: 2px; }
.st-bar i.s { background: var(--acc); position: absolute; left: 22%; right: 22%; bottom: 0; }
.st-days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-top: 6px; font-size: 11px; color: var(--muted); font-weight: 700; text-align: center; }
.st-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.st-src .row { min-height: 56px; }
.st-src .bar { height: 6px; border-radius: 3px; background: var(--paper2); margin-top: 6px; overflow: hidden; }
.st-src .bar i { display: block; height: 100%; background: var(--acc); border-radius: 3px; }
.rq-cake-pic { width: 190px; flex: none; }
.rq-cake-pic svg { width: 100%; height: auto; display: block; }
@media (max-width: 599px) { .rq-cake-top { flex-direction: column; align-items: flex-start; } .rq-cake-pic { width: 100%; max-width: 280px; align-self: center; } }
/* фаза 3: предоплата и уведомления клиенту */
.of-tabs { margin-bottom: 16px; flex-wrap: wrap; }
.of-yk-state { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.of-receipt h3 { margin-bottom: 4px; }
.of-channels { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.of-channels .chip { height: auto; min-height: 28px; white-space: normal; padding: 4px 12px; }
.of-tpl { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.of-tpl:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 1100px) { .of-tpl { grid-template-columns: 280px minmax(0, 1fr); } .of-tpl .of-preview { grid-column: 2; } }
.of-preview { font-size: 13.5px; color: var(--ink2); background: var(--paper2); border-radius: 12px; padding: 10px 12px; overflow-wrap: anywhere; }
.of-preview small { display: block; color: var(--muted); font-weight: 700; font-size: 12px; margin-bottom: 2px; }
.rq-pay-block .cs-amount { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: var(--accs); margin: 8px 0 10px; }
.rq-pay-block .cs-amount b { font-size: 22px; }
.rq-pay-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; font-size: 14px; }
.rq-pay-list span { display: flex; justify-content: space-between; gap: 8px; }
.cs-paid-staff { display: flex; gap: 8px; align-items: center; color: var(--ok); background: var(--oks); padding: 10px 12px; border-radius: 12px; margin: 8px 0; font-size: 14.5px; }

/* Настройки витрины */
.of-sc-head { display: grid; gap: 12px; }
.of-sc-head .of-sc-toggle { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.of-sc-head .btn { justify-self: start; }
.of-sc.off summary .rm b { color: var(--muted); }
.of-sc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.of-sc-acts form { margin: 0; }
.of-sc-pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-sc-fields][data-weight="1"] [data-u-piece], [data-sc-fields][data-weight="0"] [data-u-weight] { display: none; }

/* Витрина в карточке заявки */
.rq-sc { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--paper2); }
.rq-sc > b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.rq-sc-lines { display: grid; gap: 6px; font-size: 14.5px; }
.rq-sc-lines > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.rq-sc-lines > div > span { font-weight: 700; min-width: 0; }
.rq-sc-lines small { display: block; font-weight: 600; font-size: 12.5px; }
.rq-sc-total { border-top: 1px solid var(--line); padding-top: 6px; font-weight: 800; }

/* «Принять»: живой расчёт — ярусы с высотами под вес, вес и цена изделия. */
.rq-preview { background: var(--paper2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; font-size: 14px; }
.rq-preview div { display: flex; justify-content: space-between; gap: 12px; }
.rq-preview span { color: var(--muted); }
.rq-preview b { text-align: right; }
.rq-preview .w { margin: 4px 0 0; color: var(--secink); background: var(--secs); border-radius: 8px; padding: 6px 8px; font-weight: 600; font-size: 13px; }
.rq-preview.bad { background: var(--bads); color: var(--bad); font-weight: 700; display: block; }

/* Заявка с несколькими тортами: торт 2, 3 в «Принять» */
.rq-cake-h { font-size: 15.5px; font-weight: 800; margin: 4px 0 -4px; }
.rq-cake-h small { font-weight: 600; font-size: 12.5px; }
.rq-xcake { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.rq-total { margin-top: 8px; }

/* Настройки «Конструктор» (3D-конструктор торта) */
.cz-form .of-switch + input + .cz-open { margin-top: 12px; }
.cz-hint { font-size: 14px; margin: 2px 0 12px; }
.cz-opts { display: grid; gap: 8px; }
@media (min-width: 700px) { .cz-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cz-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 56px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); }
.cz-on { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 800; flex: 1 1 140px; }
.cz-on input { width: 22px; height: 22px; accent-color: var(--acc); flex: none; }
.cz-price { width: 120px; flex: none; }
.cz-free { font-size: 13.5px; font-weight: 700; }
.cz-opt .err { flex-basis: 100%; }
.cz-palette { display: grid; gap: 8px; }
@media (min-width: 900px) { .cz-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cz-color { display: grid; grid-template-columns: 44px 104px minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.cz-color input[type=color] { width: 44px; height: 44px; padding: 2px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.cz-color .cz-hex { font-family: ui-monospace, monospace; text-transform: uppercase; }
.cz-color .cz-x { width: 44px; padding: 0; justify-content: center; }
.cz-color .err { grid-column: 1 / -1; }
@media (max-width: 420px) { .cz-color { grid-template-columns: 44px 92px minmax(0, 1fr) 40px; gap: 6px; } }

/* Карточка заявки: «Как собрал клиент» */
.rq-design { display: grid; gap: 12px; margin-top: 14px; padding: 12px; border-radius: 14px; background: var(--paper2); }
@media (min-width: 700px) { .rq-design { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } }
.rq-design-pic { display: block; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.rq-design-pic img { display: block; width: 100%; height: auto; }
.rq-design h3 { font-size: 15px; margin: 0 0 6px; }
.rq-design ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14.5px; }
.rq-design .sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); vertical-align: -2px; margin-left: 4px; }
.rq-design .rq-design-sur { margin-top: 8px; font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* Конструктор, шаг «Декор»: группы, «нет в наличии», палитры узора; слои разреза начинки */
.cz-part { margin: 22px 0 0; }
.cz-decor .of-switch { margin-bottom: 10px; }
.cz-out { border-style: dashed; background: var(--paper2); }
.cz-stock { flex: none; }
.cz-both { margin-top: 12px; }
.cz-pals { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.cz-dots { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.cz-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
#cz-cut .cz-open { margin-top: 12px; }
.of-cut { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.of-cut-preview { display: flex; flex-direction: column; width: 120px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.of-cut-l { height: 12px; }
.of-cut-l.of-cut-cream, .of-cut-l.of-cut-filling { height: 7px; }
.of-cut-rows { display: grid; gap: 6px; }
.of-cut-rows.off { opacity: .55; }
.of-cut-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 44px 96px; gap: 6px; align-items: center; }
.of-cut-row input[type=color] { width: 44px; height: 44px; padding: 2px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); }
.of-cut-n { font-weight: 800; color: var(--muted); text-align: center; }
.of-cut-hex { font-family: ui-monospace, monospace; text-transform: uppercase; }
@media (min-width: 700px) { .of-cut-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
