/* MEOW PUFF — админ-панель (подгружается вместе с admin.js) */

.adm { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); color: var(--text); opacity: 0; transform: translateY(18px); transition: opacity .35s, transform .5s var(--ease); }
.adm.in { opacity: 1; transform: none; }

/* вход */
.adm-login { flex: 1; overflow: auto; display: flex; flex-direction: column; justify-content: center; gap: 20px; width: 100%; max-width: 400px; margin: 0 auto; padding: calc(24px + var(--sat)) 22px calc(24px + var(--sab)); }
.lg-top { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.lg-top .mark { color: var(--accent-ink); margin-bottom: 8px; }
.lg-top h1 { font: 800 32px/1.05 var(--display); letter-spacing: -.025em; }
.lg-top p { color: var(--mute); }
.login-form { display: flex; flex-direction: column; gap: 4px; }
.pw { position: relative; display: flex; }
.pw .inp { padding-right: 48px; }
.eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--mute); }
.eye.on { color: var(--accent-ink); }
.login-form .btn { margin-top: 10px; }
.login-form .hint.block { margin: 4px 0; }

/* каркас */
.adm-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(8px + var(--sat)) 12px 8px 20px; border-bottom: 1px solid var(--line); }
.adm-title { font: 800 22px/1.1 var(--display); letter-spacing: -.02em; }
.adm-main { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.view { max-width: 720px; margin: 0 auto; padding: 14px 14px 28px; display: flex; flex-direction: column; gap: 12px; }
.view-in { animation: scrIn .5s var(--ease) both; }
.adm-nav { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + var(--sab)); background: var(--bg); border-top: 1px solid var(--line); }
.nav-b { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; color: var(--mute); border-radius: 14px; transition: color .25s; min-width: 0; }
.nav-b em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.nav-b.on { color: var(--accent-ink); }
.nav-b:active .ni { transform: scale(.88); }
.ni { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; transition: background-color .3s, transform .2s var(--ease); }
.nav-b.on .ni { background: var(--accent-soft); }
.nb { position: absolute; top: -3px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font: 700 10.5px/17px var(--font); text-align: center; }

/* карточки и общие блоки */
.a-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.a-card .fld { margin-bottom: 0; }
.a-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.a-h h3 { font: 800 17px/1.2 var(--display); letter-spacing: -.01em; }
.cnt { color: var(--mute); font-weight: 600; }
.fh { color: var(--mute); font-size: 13px; line-height: 1.4; margin: 0; }
.fh.lead { margin-bottom: 12px; }
em.fh { font-style: normal; }
.a-empty { padding: 36px 16px; }
.a-foot { display: flex; flex-direction: column; margin-top: 8px; }
.a-alert { display: flex; flex-direction: column; gap: 2px; padding: 13px 15px; border-radius: 16px; background: color-mix(in srgb, var(--warn) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.a-alert b { color: var(--warn); font-size: 14px; }
.a-alert span { color: var(--text); font-size: 13.5px; opacity: .85; }
.tag { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9px; background: var(--s3); color: var(--mute); white-space: nowrap; }
.dng { color: var(--danger); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two-b { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; margin-top: 4px; }
.two-b .btn { padding: 0 10px; }
.tool-row { display: flex; gap: 8px; align-items: center; }
.tool-row .inp { flex: 1; min-width: 0; }
.add-b { flex: none; min-height: 46px; padding: 0 16px 0 12px; }
.sel { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238d8d93' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.sel option { background: var(--s1); color: var(--text); }
.dlg-f { margin-top: 10px; }
.view .lbl { margin-bottom: 0; }

/* переключатель */
.sw { position: relative; flex: none; width: 50px; height: 30px; border-radius: 15px; background: var(--s3); transition: background-color .25s; }
.sw i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .35s var(--ease); }
.sw.on { background: var(--accent); }
.sw.on i { transform: translateX(20px); background: var(--on-accent); }
[data-theme='light'] .sw:not(.on) { background: #c9c9c4; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sw-row > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sw-row b { font-weight: 600; }
.sw-row span { color: var(--mute); font-size: 13px; }

/* обзор */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 13px 12px; border-radius: 18px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.stat > span:first-child { color: var(--mute); font-size: 12px; font-weight: 600; }
.stat b { font: 800 clamp(16px, 5vw, 21px)/1.15 var(--display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stat > span:last-child { color: var(--mute); font-size: 12px; }
.a-new { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-align: left; transition: transform .18s var(--ease); }
.a-new:active { transform: scale(.985); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; padding-top: 6px; }
.bar { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.bar u { display: block; width: 100%; min-height: 3px; height: calc(var(--h) * 100px); max-height: 100px; border-radius: 8px 8px 4px 4px; background: var(--s3); transform-origin: bottom; animation: barUp .8s calc(var(--i) * 60ms + .1s) var(--ease) both; }
.bar.cur u { background: var(--accent); }
.bar span { font-size: 11px; color: var(--mute); }
.bar small { position: absolute; top: 0; font-size: 11px; color: var(--mute); }
@keyframes barUp { from { transform: scaleY(0); } }
.stchips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stc { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border-radius: 14px; font-weight: 600; font-size: 13px; text-align: left; }
.stc b { font: 800 22px/1 var(--display); }
.top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; counter-reset: n; }
.top-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); counter-increment: n; }
.top-list li:first-child { border-top: 0; }
.top-list li span::before { content: counter(n) '  '; color: var(--accent-ink); font-weight: 700; }
.top-list em { font-style: normal; color: var(--mute); font-size: 13px; }
.top-list b { font-weight: 600; font-variant-numeric: tabular-nums; }
.low { display: flex; flex-direction: column; }
.low-r { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); text-align: left; }
.low-r:first-child { border-top: 0; }
.low-r b { color: var(--warn); white-space: nowrap; }
.low-r b.z { color: var(--danger); }

/* поиск и чипы */
.a-search { flex: 1; min-width: 0; }
.a-cw { margin: 0 -14px; }
.a-chips { gap: 6px; padding: 2px 14px; }
.a-chip { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; background: var(--s2); color: var(--text); border-radius: 18px; transition: background-color .25s, color .25s, transform .15s; }
.a-chip:active { transform: scale(.95); }
.a-chip i { font-style: normal; font-size: 12px; color: var(--mute); font-weight: 600; }
.a-chip.on { background: var(--accent); color: var(--on-accent); }
.a-chip.on i { color: var(--on-accent); opacity: .7; }

/* заказы */
.olist { display: flex; flex-direction: column; gap: 8px; }
.ocard { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); text-align: left; opacity: 0; animation: cardIn .5s calc(var(--i) * 40ms) var(--ease) forwards; transition: transform .18s var(--ease); }
.ocard:active { transform: scale(.985); }
.ocard-h { display: flex; align-items: center; gap: 10px; }
.ocard-h b { font: 800 17px/1 var(--display); }
.ocard-h time { margin-left: auto; color: var(--mute); font-size: 12.5px; }
.ocard-i { color: var(--text); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ocard-f { display: flex; justify-content: space-between; gap: 10px; color: var(--mute); font-size: 13px; }
.ocard-f b { color: var(--text); font-variant-numeric: tabular-nums; }
.more-w { display: flex; flex-direction: column; }
.o-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.o-top time { color: var(--mute); font-size: 13px; }
.sheet-body .a-card + .a-card, .sheet-body .a-card + .btn, .sheet-body .a-card + .fld { margin-top: 12px; }
.o-line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
.o-line:first-of-type { border-top: 0; }
.o-line > div { display: flex; flex-direction: column; min-width: 0; }
.o-line > div span { color: var(--mute); font-size: 13px; }
.o-line em { font-style: normal; color: var(--mute); font-size: 13px; white-space: nowrap; }
.o-line b { font-variant-numeric: tabular-nums; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.kv span { color: var(--mute); flex: none; }
.kv b, .kv a { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.kv a { color: var(--accent-ink); text-decoration: none; }
.stc.st-new, .stc.st-accepted, .stc.st-done, .stc.st-cancelled { }

/* товары */
.plist { display: flex; flex-direction: column; gap: 8px; }
.plist.flat { gap: 0; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; opacity: 0; animation: cardIn .5s calc(var(--i) * 35ms) var(--ease) forwards; transition: transform .18s var(--ease); }
.plist.flat .prow { background: transparent; box-shadow: none; border-top: 1px solid var(--line); border-radius: 0; padding-inline: 0; }
.plist.flat .prow:first-child { border-top: 0; }
.prow:active { transform: scale(.985); }
.prow.dim .thumb, .prow.dim .pi { opacity: .45; }
.prow .thumb { width: 60px; height: 60px; }
.pi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pi b { font-weight: 600; font-size: 14.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi > span { color: var(--mute); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi .price { flex-direction: row; align-items: baseline; gap: 8px; margin-top: 2px; }
.pi .price b { font: 700 14px/1.2 var(--display); overflow: visible; }

/* редактор товара */
.photo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ph-prev { flex: none; position: relative; width: 96px; height: 96px; border-radius: 20px; background: var(--s2); overflow: hidden; display: grid; place-items: center; color: var(--mute); }
.ph-prev img { width: 100%; height: 100%; object-fit: cover; }
.ph-prev.busy::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .5) center / 28px no-repeat; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.photo-act { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sheet-body > .fld, .sheet-body > .two, .sheet-body > .seg, .sheet-body > .lbl, .sheet-body > .quick, .sheet-body > .fl-ed, .sheet-body > .code-row { margin-bottom: 12px; }
.sheet-body > .lbl { margin-bottom: 8px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.q { height: 34px; padding: 0 14px; border-radius: 17px; background: var(--s2); color: var(--text); font-size: 13px; font-weight: 600; }
.chip.q:active { background: var(--accent); color: var(--on-accent); }
.chip.q.clr { color: var(--mute); }
.pct { min-height: 0; font-size: 13px; color: var(--accent-ink); font-weight: 600; margin-bottom: 8px; }
.pct:empty { display: none; }
.pct.bad { color: var(--danger); }
input[type='date'].inp { min-height: 48px; }
.fl-ed { display: flex; flex-direction: column; gap: 8px; }
.fl-r { display: grid; grid-template-columns: 1fr 76px 34px; gap: 6px; align-items: center; }
.fl-r .inp { min-height: 44px; padding: 10px 12px; }
.fl-r .inp.st { text-align: center; }
.fl-act { display: flex; gap: 8px; margin: 10px 0; }
.sheet-body > textarea.inp { margin-bottom: 8px; }
.sheet-body > .a-card { margin-top: 14px; }
.foot-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.foot-row .btn { padding: 0 6px; gap: 4px; font-size: 13px; }

/* категории */
.clist { display: flex; flex-direction: column; gap: 8px; }
.crow { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-radius: 18px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); opacity: 0; animation: cardIn .5s calc(var(--i) * 40ms) var(--ease) forwards; }
.ci { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci span { color: var(--mute); font-size: 13px; }
.cact { display: flex; gap: 4px; flex: none; }
.cact .icon-btn:disabled { opacity: .25; }

/* промокоды */
.promos { display: flex; flex-direction: column; }
.pr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.pr:first-child { border-top: 0; }
.pr-c { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-c b { font: 700 15px/1.2 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .04em; }
.pr-c em { font-style: normal; color: var(--accent-ink); font-weight: 700; }
.pr > span { color: var(--mute); font-size: 12.5px; grid-column: 1; }
.pr-s { grid-column: 2; grid-row: 1 / span 2; }
.pr.dim .pr-c b { opacity: .5; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.code-row .fld { margin-bottom: 0; }
.code-row .btn { min-height: 48px; }
.code-row .inp { text-transform: uppercase; letter-spacing: .06em; font-family: ui-monospace, 'SF Mono', Menlo, monospace; }

/* «Ещё» */
.mlist { display: flex; flex-direction: column; border-radius: 20px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.mrow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; border-top: 1px solid var(--line); transition: background-color .2s; color: var(--mute); }
.mrow:first-child { border-top: 0; }
.mrow:active { background: var(--s2); }
.mrow > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mrow b { color: var(--text); font-weight: 600; }
.mrow span:not(.mi) { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.nlist { display: flex; flex-direction: column; margin-bottom: 14px; }
.nrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.nrow:first-child { border-top: 0; }
.nrow > div { display: flex; flex-direction: column; min-width: 0; }
.nrow b { font-weight: 600; }
.nrow span { color: var(--mute); font-size: 13px; }
.sheet-body > .btn { margin-top: 8px; width: 100%; }

@media (min-width: 720px) {
  .adm-nav { max-width: 720px; margin: 0 auto; width: 100%; }
}
@media (max-width: 349px) {
  .stats { gap: 6px; }
  .stat { padding: 11px 9px; }
  .foot-row { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .fl-r { grid-template-columns: 1fr 64px 34px; }
}

.two-b.even { grid-template-columns: 1fr 1fr; margin-top: 0; }
.two-b.even .btn { min-height: 46px; }
.sheet-body > .btn.sm.danger { margin-top: 14px; align-self: stretch; }
.bars.zero { height: 90px; }
.view > .a-search { flex: none; }

/* редактор дизайна */
.dz-g{margin:0 0 18px}.dz-opts{display:flex;flex-wrap:wrap;gap:8px}
.dz-opt{padding:10px 14px;border-radius:12px;border:1px solid var(--line,rgba(255,255,255,.1));background:var(--s2);color:inherit;font:inherit;font-size:14px;cursor:pointer}
.dz-opt.on{border-color:var(--accent);color:var(--accent-ink);background:var(--accent-soft)}
.dz-sw,.dz-accwrap{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.dz-c{width:38px;height:38px;border-radius:50%;border:2px solid transparent;box-shadow:inset 0 0 0 1px rgba(128,128,128,.35);cursor:pointer;padding:0}
.dz-c.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--sheet,#000) inset}
.dz-color{width:38px;height:38px;border:0;border-radius:50%;padding:0;background:none;cursor:pointer}
.dz-logo{width:64px;height:64px;border-radius:16px;background:var(--s2);display:grid;place-items:center;overflow:hidden;flex:none}.dz-logo img{width:100%;height:100%;object-fit:contain}.dz-logo.busy{opacity:.5}
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.kpis.two { grid-template-columns: 1fr 1fr; }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 8px; }
.mini-bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.mini-bars u { display: block; min-height: 2px; height: calc(var(--h) * 100%); border-radius: 4px 4px 2px 2px; background: var(--accent); opacity: .85; text-decoration: none; }
