/* ═══════════ ТОКЕНЫ ═══════════ */
:root{
  --bg:        #faf5e6;   /* кремовый фон, как на сайте-образце */
  --card:      #ffffff;
  --ink:       #22301f;
  --muted:     #77836f;
  --g-dark:    #1c451f;
  --g:         #2e7d32;
  --g-soft:    #e9f3e6;
  --accent:    #f0a11e;
  --accent-dk: #d98c07;
  --line:      #e7e3d6;
  --red:       #d64541;
  --r:         16px;
  --shadow:    0 1px 2px rgba(34,48,31,.04), 0 4px 16px rgba(34,48,31,.07);
}

*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Segoe UI',system-ui,sans-serif;background:var(--bg);color:var(--ink);line-height:1.5}
a{text-decoration:none;color:inherit}
button{font:inherit;border:0;cursor:pointer;background:none}
h1,h2,h3{line-height:1.2}
input,select{font:inherit;padding:11px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;width:100%;transition:border-color .15s}
input:focus,select:focus{outline:none;border-color:var(--g)}

.card{background:var(--card);border-radius:var(--r);box-shadow:var(--shadow)}

/* ═══════════ шапка ═══════════ */
.topbar{background:var(--g-dark);color:#e6efe1;font-size:13px;display:flex;justify-content:center;gap:24px;padding:8px 16px;flex-wrap:wrap}
.topbar b{color:#ffd28a}

.header{position:sticky;top:0;z-index:50;background:var(--card);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:12px 24px;flex-wrap:wrap}
.logo{display:flex;align-items:center;gap:10px}
.logo-mark{width:44px;height:44px;border-radius:12px;font-size:22px;display:grid;place-items:center;background:var(--g)}
.logo-text{font-size:20px;font-weight:800}
.logo-text em{color:var(--accent-dk);font-style:normal}
.catalog-btn{color:#fff;font-weight:700;padding:12px 20px;border-radius:999px;background:var(--g);transition:background .15s}
.catalog-btn:hover{background:var(--g-dark)}
.search{flex:1;min-width:200px;display:flex;gap:8px;background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:4px 6px 4px 18px;align-items:center}
.search input{border:0;background:none;padding:8px 0}
.search input:focus{border:0}
.header-actions{display:flex;gap:10px;align-items:center;margin-left:auto}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:700;padding:11px 20px;border-radius:999px;transition:.15s;border:2px solid transparent}
.btn.accent{background:var(--accent);color:#fff}
.btn.accent:hover{background:var(--accent-dk)}
.btn.ghost{border-color:var(--line);color:var(--ink);background:var(--card)}
.btn.ghost:hover{border-color:var(--g);color:var(--g)}
.btn.big{padding:14px 28px;font-size:16px}

.cart-btn{position:relative;width:48px;height:48px;border-radius:50%;background:var(--card);border:1px solid var(--line);display:grid;place-items:center;font-size:20px}
.badge{position:absolute;top:-4px;right:-4px;background:var(--red);color:#fff;font-size:11px;font-weight:800;min-width:18px;height:18px;border-radius:9px;display:grid;place-items:center;padding:0 4px}
.badge.pulse{animation:pulse .4s}
@keyframes pulse{50%{transform:scale(1.35)}}

.flash{max-width:1200px;margin:14px auto -6px;padding:12px 18px;border-radius:12px;background:var(--g);color:#fff;font-weight:600}
.container{max-width:1200px;margin:0 auto;padding:28px 20px 70px}

/* ═══════════ hero ═══════════ */
.hero{display:grid;grid-template-columns:1.15fr 1fr;gap:18px;margin-bottom:44px}
.hero-left{background:var(--g-dark);color:#fff;border-radius:20px;padding:34px;display:flex;flex-direction:column;gap:14px}
.hero-left h1{font-size:34px}
.hero-left p{color:#d6e6d0;max-width:48ch}
.live{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;color:#ffd28a;letter-spacing:.6px}
.live i,.ht-live i{width:8px;height:8px;border-radius:50%;background:var(--g);animation:blink 1.8s infinite}
.live i{background:#8fdc6e}
@keyframes blink{50%{box-shadow:0 0 0 8px rgba(143,220,110,0)}}
.hero-stats{display:flex;gap:28px;margin:8px 0;flex-wrap:wrap}
.hero-stats b{font-size:23px;display:block;color:#ffd28a}
.hero-stats span{font-size:12.5px;color:#c9dec2}

/* ── путь продукта + факты ── */
.hero-track{position:relative;padding:22px;display:flex;flex-direction:column;gap:16px}
.ht-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.ht-title{font-weight:800;color:var(--muted);font-size:12.5px;letter-spacing:.8px;text-transform:uppercase}
.ht-live{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:700;color:var(--g)}

.ht-steps{position:relative;display:flex;justify-content:space-between;padding:2px 14px}
.ht-steps::before{content:"";position:absolute;left:48px;right:48px;top:24px;border-top:3px dashed #cfe3c8}
.stop{position:relative;z-index:1;width:104px;text-align:center}
.stop span{font-size:30px}
.stop small{display:block;font-size:11.5px;color:var(--muted);line-height:1.3;margin-top:4px;font-weight:600}
.truck{position:absolute;top:12px;left:2%;font-size:26px;z-index:0;animation:drive 7s ease-in-out infinite}
@keyframes drive{0%{left:2%;opacity:0}10%{opacity:1}48%{left:88%;opacity:1}58%{left:88%;opacity:0}100%{left:2%;opacity:0}}

.ht-facts{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fact{display:flex;align-items:center;gap:10px;background:var(--bg);border-radius:12px;padding:10px 12px}
.fact>span{font-size:20px}
.fact b{display:block;font-size:14px;line-height:1.2}
.fact small{color:var(--muted);font-size:12px}

/* ═══════════ заголовки секций ═══════════ */
.sec{font-size:23px;font-weight:800;margin:44px 0 18px;display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.sec-sub{font-size:13.5px;font-weight:600;color:var(--muted)}
.more{font-size:14px;color:var(--g);font-weight:700;margin-left:auto}

/* ═══════════ качество ═══════════ */
.qgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.qcard{padding:24px;display:flex;flex-direction:column;gap:8px}
.q-emoji{width:56px;height:56px;border-radius:16px;background:var(--g-soft);display:grid;place-items:center;font-size:28px}
.qcard h3{font-size:17px}
.qcard p{color:var(--muted);font-size:14px}

/* ═══════════ чипсы ═══════════ */
.chips{display:flex;gap:10px;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:6px;background:var(--card);border:1px solid var(--line);padding:9px 15px;border-radius:999px;font-weight:600;font-size:14px;cursor:pointer;transition:border-color .15s}
.chip:hover{border-color:var(--g)}
.chip input{width:auto;accent-color:var(--g)}

/* ═══════════ наборы ═══════════ */
.bundles{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.bundle{padding:20px;display:flex;flex-direction:column;gap:10px;border-top:4px solid var(--accent)}
.bundle h3{font-size:18px}
.b-desc{color:var(--muted);font-size:13.5px}
.b-item-wrap{justify-content:flex-start}
.b-item-wrap b{margin-left:auto;color:var(--g)}
.b-total{font-size:17px;font-weight:800;margin-top:auto}
.b-total .sum{color:var(--accent-dk)}

/* ═══════════ карточки товаров ═══════════ */
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px}
.pcard{padding:16px;display:flex;flex-direction:column;gap:6px;transition:transform .18s,box-shadow .18s}
.pcard:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(34,48,31,.12)}
.pc-emoji{font-size:52px;text-align:center;padding:10px 0}
.pc-name{font-weight:700;font-size:15px}
.pc-origin{font-size:12.5px;color:var(--muted);width:fit-content}
.pc-origin:hover{color:var(--g)}
.fresh small{color:var(--muted);font-size:11.5px}
.fresh-bar{height:6px;background:#eceada;border-radius:3px;overflow:hidden;margin-bottom:3px}
.fresh-bar span{display:block;height:100%;background:var(--g)}
.fresh.big .fresh-bar{height:9px}
.pc-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:8px}
.pc-price{font-size:18px;font-weight:800}
.pc-price small{font-weight:600;color:var(--muted);font-size:12px}
.btn.add{width:40px;height:40px;border-radius:12px;background:var(--g-soft);color:var(--g);font-size:20px;padding:0}
.btn.add.ok{background:var(--g);color:#fff}

/* ═══════════ страница товара ═══════════ */
.product{display:grid;grid-template-columns:300px 1fr;gap:28px;padding:28px}
.pd-emoji{font-size:130px;display:grid;place-items:center;background:var(--bg);border-radius:18px}
.pd-info h1{font-size:28px;margin-bottom:6px}
.pd-desc{color:var(--muted);margin:12px 0}
.pd-buy{display:flex;align-items:center;gap:16px;margin-top:16px;flex-wrap:wrap}
.pc-price.big{font-size:26px}

/* ═══════════ каталог ═══════════ */
.catalog-layout{display:grid;grid-template-columns:240px 1fr;gap:26px;align-items:start}
.cats{position:sticky;top:92px;padding:18px}
.cats h2{font-size:18px;margin-bottom:10px}
.cat{display:block;padding:9px 12px;border-radius:10px;font-size:14.5px;font-weight:600}
.cat:hover{background:var(--g-soft)}
.cat.on{background:var(--g);color:#fff}
.empty{padding:44px;text-align:center;color:var(--muted);background:var(--card);border-radius:var(--r);box-shadow:var(--shadow)}
.link{color:var(--g);font-weight:700}

/* ═══════════ корзина ═══════════ */
.cart-list{display:flex;flex-direction:column;gap:10px}
.cart-row{display:grid;grid-template-columns:56px 1fr auto auto 40px;gap:14px;align-items:center;padding:12px 16px}
.cr-emoji{font-size:32px;text-align:center}
.cr-info b{display:block}
.cr-info small{color:var(--muted)}
.qty{display:flex;align-items:center;gap:10px}
.qty form button{width:32px;height:32px;border-radius:10px;background:var(--g-soft);color:var(--g);font-size:17px;font-weight:800}
.cr-sum{font-weight:800;min-width:80px;text-align:right}
.del{color:var(--red);font-size:15px;width:36px;height:36px;border-radius:10px}
.del:hover{background:#fdeceb}
.cart-total{font-size:20px;margin:18px 2px;text-align:right}

/* ═══════════ формы ═══════════ */
.form{display:flex;flex-direction:column;gap:14px;max-width:560px}
.form label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px}
fieldset{border:0}
legend{font-weight:700;margin-bottom:8px}
.slots{display:flex;gap:10px;flex-wrap:wrap}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}

.auth{display:grid;place-items:center;padding:40px 0}
.auth-card{padding:34px;max-width:400px;width:100%;text-align:center;display:flex;flex-direction:column;gap:14px}
.auth-emoji{font-size:44px}
.auth-card h1{font-size:26px}
.muted{color:var(--muted);font-size:14px}

/* ═══════════ заказы ═══════════ */
.order{margin-bottom:14px;padding:18px}
.o-head{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.status{font-size:12.5px;font-weight:800;padding:4px 10px;border-radius:999px}
.st-собираем{background:#fff3cd;color:#8a6d00}
.st-в-пути{background:#e3f2fd;color:#0b5394}
.st-доставлен{background:var(--g-soft);color:var(--g)}
.st-отменён{background:#fdecea;color:#b71c1c}
.o-items{margin:8px 0 8px 18px;font-size:14.5px}
.o-foot{font-size:14px;color:var(--muted)}

/* ═══════════ админка ═══════════ */
.admin-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:20px;align-items:start}
.tbl{width:100%;border-collapse:collapse;font-size:14px}
.tbl th{background:var(--g-soft);text-align:left;padding:10px}
.tbl td{padding:9px 10px;border-top:1px solid var(--line)}

/* ═══════════ футер ═══════════ */
.footer{background:var(--g-dark);color:#d6e6d0;margin-top:60px}
.footer .wrap{max-width:1200px;margin:auto;padding:40px 20px 20px;display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:24px}
.footer h4{color:#fff;font-size:12px;letter-spacing:1px;margin-bottom:12px;text-transform:uppercase}
.footer p,.footer a{font-size:14px;line-height:1.8;display:block}
.footer a:hover{color:#ffd28a}
.footer .brand b{color:#fff;font-size:19px}
.footer .brand b em{color:#ffb84d;font-style:normal}
.copy{border-top:1px solid rgba(255,255,255,.12);max-width:1200px;margin:auto;padding:14px 20px;display:flex;justify-content:space-between;font-size:13px;color:#9dbb95;flex-wrap:wrap;gap:6px}

/* ═══════════ мобильное меню ═══════════ */
.mobile-nav{display:none;position:fixed;bottom:0;left:0;right:0;background:var(--card);border-top:1px solid var(--line);z-index:60;justify-content:space-around;padding:8px 4px calc(8px + env(safe-area-inset-bottom))}
.mobile-nav a{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:20px;color:var(--muted);position:relative}
.mobile-nav span{font-size:11px;font-weight:700}
.mn-badge{position:absolute;top:-4px;right:6px;background:var(--red);color:#fff;font-size:10px;font-weight:800;min-width:16px;height:16px;border-radius:8px;display:grid;place-items:center;padding:0 3px}

/* ═══════════ плавающий фон ═══════════ */
.float-bg{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.float-bg span{
  position:absolute;bottom:-70px;left:var(--x);
  font-size:var(--s);opacity:0;
  animation:floatUp var(--t) linear var(--d) infinite;
  will-change:transform;
}
@keyframes floatUp{
  0%  {transform:translateY(0) rotate(-8deg);opacity:0}
  12% {opacity:var(--o)}
  85% {opacity:var(--o)}
  100%{transform:translateY(-115vh) rotate(14deg);opacity:0}
}
@media (prefers-reduced-motion: reduce){.float-bg{display:none}}

.shake{animation:shake .4s}
@keyframes shake{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}

/* ═══════════ адаптив ═══════════ */
@media(max-width:1000px){
  .hero{grid-template-columns:1fr}
  .bundles,.qgrid{grid-template-columns:1fr}
  .catalog-layout{grid-template-columns:1fr}
  .cats{position:static;display:flex;flex-wrap:wrap;gap:8px}
  .cats h2{width:100%}
  .cat{border:1px solid var(--line);border-radius:999px;padding:7px 14px}
  .cat.on{color:#fff}
  .admin-grid{grid-template-columns:1fr}
  .product{grid-template-columns:1fr}
}
@media(max-width:720px){
  .topbar{font-size:11.5px;gap:10px}
  .header{padding:10px 14px;gap:10px}
  .catalog-btn{display:none}
  .search{order:5;flex-basis:100%}
  .container{padding:18px 14px 90px}
  .hero-left{padding:24px}
  .hero-left h1{font-size:25px}
  .sec{font-size:20px}
  .footer .wrap{grid-template-columns:1fr 1fr}
  .pgrid{grid-template-columns:repeat(2,1fr)}
  .cart-row{grid-template-columns:40px 1fr auto auto 32px;gap:8px;padding:10px}
  .cr-info small{display:none}
  .stop{width:88px}
  .ht-facts{grid-template-columns:1fr 1fr}
  .mobile-nav{display:flex}
}
/* ═══ личный кабинет, промо, претензии, админка, поиск ═══ */
.search-wrap{flex:1;min-width:200px;position:relative}
.suggest{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#fff;border-radius:14px;
  box-shadow:0 10px 30px rgba(34,48,31,.18);overflow:hidden;display:none;z-index:70}
.suggest.open{display:block}
.suggest a{display:flex;align-items:center;gap:10px;padding:10px 16px;font-weight:600;font-size:14.5px}
.suggest a:hover{background:var(--g-soft)}
.suggest a small{margin-left:auto;color:var(--muted);font-weight:600}

.bonus-chip{background:var(--g-soft);color:var(--g);border-color:transparent}
.btn.sm{padding:6px 12px;font-size:13px}

.checkout-box{display:flex;flex-direction:column;gap:12px}
.checkout-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:18px;align-items:start}
.promo-row{display:flex;gap:10px}
.promo-applied{display:flex;align-items:center;gap:12px}
.chip.ok{background:var(--g-soft);border-color:var(--g);color:var(--g)}
.promo-x{color:var(--muted);text-decoration:underline;font-size:13px}
.sum-lines{display:flex;flex-direction:column;gap:8px;border-top:1px dashed var(--line);padding-top:12px}
.sum-lines div{display:flex;justify-content:space-between;font-size:15px}
.sum-lines .green{color:var(--g)}
.sum-lines .big{font-size:19px}
.bonus-line{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px;background:var(--bg);
  border-radius:12px;padding:12px}
.bonus-line small{color:var(--muted);font-weight:500}
.total-line{font-size:21px;display:flex;justify-content:space-between;align-items:center;
  border-top:1px dashed var(--line);padding-top:12px}

.claim-btn{margin-top:10px;width:fit-content}
.o-total{margin-left:auto}

.profile-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:16px;align-items:start}
.p-bonus,.p-ref,.p-claims{padding:22px;display:flex;flex-direction:column;gap:12px}
.pb-head{font-weight:800;font-size:16px}
.pb-sum{font-size:42px;font-weight:800;color:var(--g)}
.ref-row{display:flex;gap:10px}
.ref-row input{background:var(--bg);font-size:13px}
.p-stats{display:flex;gap:20px;border-top:1px dashed var(--line);padding-top:12px;flex-wrap:wrap}
.p-stats b{font-size:19px;display:block}
.p-stats span{font-size:12px;color:var(--muted)}
.claim{border-top:1px dashed var(--line);padding-top:12px}
.cl-head{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:6px}
.cl-body{font-size:14.5px}
.cl-reply{margin-top:8px;background:var(--g-soft);border-radius:10px;padding:10px 12px;font-size:14px}
.cst-новая{background:#fdecea;color:#b71c1c}
.cst-в-работе{background:#fff3cd;color:#8a6d00}
.cst-решена{background:var(--g-soft);color:var(--g)}
.cst-отклонена{background:#e5e5e5;color:#555}
.o-items.left{margin-left:18px}

.stat-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-bottom:16px}
.stat{padding:16px}
.stat span{font-size:12.5px;color:var(--muted);display:block}
.stat b{font-size:22px}
.stat.warn b{color:var(--accent-dk)}
.stat.bad{background:#fdecea}.stat.bad b{color:var(--red)}
.chart-card{padding:20px;margin-bottom:20px}
.bars{display:flex;gap:10px;align-items:flex-end;height:130px;margin-top:14px}
.bar-col{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:6px;height:100%}
.bar{width:100%;max-width:52px;background:linear-gradient(180deg,var(--g),var(--g-soft));border-radius:8px 8px 3px 3px;min-height:4px}
.bar-col small{color:var(--muted);font-size:11.5px}

.adm-h{font-size:19px;margin:26px 0 12px;display:flex;align-items:center;gap:10px}
.pill{font-size:12px;font-weight:800;padding:3px 10px;border-radius:999px}
.pill.red{background:#fdecea;color:var(--red)}
.adm-claim{margin-bottom:12px;gap:8px}
.adm-claim textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:10px;font:inherit;resize:vertical}
.promo-admin{display:grid;grid-template-columns:1.4fr .7fr .7fr 1fr auto;gap:8px;margin-bottom:12px}
.adm-order{margin-bottom:12px}
.mutedrow td{opacity:.45}
.warnrow td{background:#fffbe8}
.low-stock{display:flex;gap:8px;flex-wrap:wrap;padding:14px;margin-bottom:8px}
.redtxt{color:var(--red)}
.auth-card.wide{max-width:520px}
.form.full{max-width:none}
.form textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:11px 14px;font:inherit;resize:vertical}

@media(max-width:1000px){
  .stat-grid{grid-template-columns:repeat(3,1fr)}
  .profile-grid,.checkout-grid{grid-template-columns:1fr}
  .promo-admin{grid-template-columns:1fr 1fr}
}
@media(max-width:720px){
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .header-actions .btn.ghost{display:none}
}
.btn.icon-only{width:44px;height:44px;padding:0;color:var(--muted)}
.btn.icon-only:hover{color:var(--red);border-color:var(--red)}
.sg-none{color:var(--muted);cursor:default}
.sg-none:hover{background:none}
/* ═══ премиум-панель мобильной навигации ═══ */
.mobile-nav{display:none;position:fixed;bottom:0;left:0;right:0;z-index:60;
  background:rgba(255,255,255,.92);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border-top:1px solid var(--line);
  justify-content:space-around;align-items:stretch;
  padding:7px 10px calc(7px + env(safe-area-inset-bottom))}
.mobile-nav a{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:5px 2px;color:#a3aca2;position:relative;border-radius:12px;transition:color .18s}
.mobile-nav a svg{width:24px;height:24px;fill:none;stroke-width:1.7}
.mobile-nav a span{font-size:11px;font-weight:600;max-width:72px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.mobile-nav a.on{color:var(--g)}
.mobile-nav a.on::before{content:"";position:absolute;top:-8px;left:50%;transform:translateX(-50%);
  width:34px;height:3px;border-radius:0 0 4px 4px;background:var(--g)}
.mn-badge{position:absolute;top:0;right:calc(50% - 22px);background:var(--red);color:#fff;
  font-size:10px;font-weight:800;min-width:16px;height:16px;border-radius:8px;
  display:grid;place-items:center;padding:0 4px}
/* ═══ фикс шапки (mobile) ═══ */
@media(max-width:720px){
  .search-wrap{order:5;flex-basis:100%}   /* поиск отдельной строкой ниже */
  .search{flex:1;min-width:0}
  .header{gap:10px 12px;padding:10px 12px}
  .header-actions{margin-left:auto;gap:8px}
  .topbar{gap:12px;padding:6px 12px;font-size:11.5px}
  .topbar span:nth-child(2){display:none} /* на телефоне — одна строка в топбаре */
}

/* фикс: панель снова видна на телефонах */
@media(max-width:720px){
  .mobile-nav{display:flex}
}


/* ═══ чат ═══ */
.chat-wrap{max-width:640px;margin:0 auto}
.chat-box{height:54vh;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:16px;background:var(--bg);border-radius:14px}
.msg{max-width:80%;padding:9px 13px;border-radius:14px;background:#fff;box-shadow:var(--shadow);font-size:14.5px;align-self:flex-start;word-wrap:break-word}
.msg.me{align-self:flex-end;background:var(--g);color:#fff}
.msg small{display:block;font-size:10.5px;opacity:.6;margin-top:3px}
.chat-send{display:flex;gap:10px;margin-top:12px}
.chat-send input{flex:1}
.chats-list .card{margin-bottom:10px;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px}
.uv{min-width:0}
.uv b{display:block}
.uv .muted{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;max-width:52vw}
.pill{font-size:12px;font-weight:800;padding:3px 10px;border-radius:999px}
.pill.red{background:#fdecea;color:var(--red)}

/* ═══ фото в претензии ═══ */
.file-label{display:flex;flex-direction:column;gap:8px;font-weight:600;font-size:14px}
.file-input{display:none}
.file-btn{display:inline-flex;align-items:center;gap:8px;border:2px dashed var(--line);border-radius:12px;padding:12px 16px;cursor:pointer;font-weight:600;color:var(--muted);background:var(--bg)}
.file-btn:hover{border-color:var(--g);color:var(--g)}
.uphotowrap img{display:none;width:96px;height:96px;object-fit:cover;border-radius:12px;margin-top:4px}
.claim-photo img{width:64px;height:64px;object-fit:cover;border-radius:10px;display:block}
.claim-photo{width:fit-content}

/* ═══ наборы: горизонтальный свайп ═══ */
.bundles{display:grid;grid-auto-flow:column;grid-auto-columns:clamp(280px,30%,360px);gap:14px;
  overflow-x:auto;padding:4px 4px 14px;scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;scrollbar-width:thin;cursor:grab}
.bundles.dragging{cursor:grabbing;scroll-snap-type:none;user-select:none}
.bundle{scroll-snap-align:start}
@media(max-width:720px){.bundles{grid-auto-columns:80vw}}
/* ═══ 5 вкладок в мобильной панели ═══ */
.mobile-nav{padding:6px 6px calc(6px + env(safe-area-inset-bottom))}
.mobile-nav a{gap:2px;padding:4px 1px}
.mobile-nav a svg{width:23px;height:23px}
.mobile-nav a span{font-size:10.5px;max-width:66px}


/* ═══ выбор количества ═══ */
.pc-buy{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-top:2px}
.qp{display:flex;align-items:center;gap:4px;background:var(--g-soft);border-radius:12px;padding:4px}
.qp-btn{width:30px;height:32px;border-radius:9px;background:#fff;color:var(--g);font-size:16px;font-weight:800}
.qp-val{width:48px;text-align:center;border:0;background:none;font-weight:800;font-size:14.5px;padding:0}
.product .qp-val{width:70px}
.pc-hint{font-size:11.5px;color:var(--muted)}
.pgrid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
@media(max-width:720px){
}
/* фикс: компактная кнопка + на карточке */
.pcard .btn.add{width:40px;height:40px;border-radius:12px;font-size:20px;padding:0;flex-shrink:0;align-self:flex-end}
@media(max-width:720px){.pcard .btn.add{width:40px;height:40px}}

/* ═══ отзывы + сетка 3-в-ряд ═══ */
/* ── рейтинг ── */
.pc-rate{font-size:13px;font-weight:800;width:fit-content}
.pc-rate::before{content:"★";color:#f5a623;margin-right:4px}
.pc-rate.big{font-size:17px}
.pd-rating{display:flex;align-items:center;gap:8px;margin-bottom:4px}

/* ── форма и список отзывов ── */
.reviews{margin-top:40px}
.rform{display:flex;flex-direction:column;gap:12px;padding:20px;margin-bottom:18px}
.rform textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:11px 14px;font:inherit;resize:vertical}
.stars-input{display:flex;align-items:center;gap:4px}
.star{font-size:30px;color:#d8d2c2;line-height:1;padding:0 2px;transition:transform .1s,color .1s}
.star.on{color:#f5a623}
.star:hover{transform:scale(1.15)}
.stars-hint{font-size:13px;color:var(--muted);margin-left:8px}
.rv-note{padding:4px 2px}
.rv-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.rv{padding:16px;display:flex;flex-direction:column;gap:6px}
.rv-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.rv-head .muted{font-size:12.5px}
.rv-text{font-size:14.5px}

/* ── мобильная сетка: 3 товара в ряд ── */
@media(max-width:720px){
  .pgrid{grid-template-columns:repeat(3,1fr);gap:8px}
  .pcard{padding:8px;gap:3px}
  .pc-emoji{font-size:40px;padding:8px 0 4px}
  .pc-name{font-size:11.5px;min-height:29px}
  .pc-unit{font-size:10px}
  .pc-rate{font-size:11px}
  .pc-price{font-size:15px}
  .pc-price small{font-size:10px;margin-left:2px}
  .btn.to-cart{padding:8px 4px;font-size:12px;border-radius:10px;margin-top:6px}
  .star{font-size:26px}
}

/* ═══ заказы: карточка-процесс ═══ */
.ocard{padding:18px;margin-bottom:16px}
.oc-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;flex-wrap:wrap}
.oc-title b{font-size:16px}
.asm{display:flex;align-items:center;gap:12px;background:var(--bg);
  border:1px solid #f2e7c9;border-left:4px solid var(--accent);
  border-radius:14px;padding:10px 14px;margin-top:12px;max-width:460px}
.asm img{width:56px;height:56px;object-fit:cover;border-radius:10px;background:#fff;flex-shrink:0}
.asm .ph{width:56px;height:56px;border-radius:10px;background:#fff;display:grid;place-items:center;font-size:22px;flex-shrink:0}
.asm b{display:block;font-size:14.5px}
.asm small{color:var(--muted);font-size:12.5px}
.asm-arrow{margin-left:auto;color:var(--accent-dk);font-size:22px}
.oc-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.chip-status{display:inline-flex;align-items:center;gap:6px;border-radius:999px;
  padding:4px 12px;font-size:12px;font-weight:800}
.chip-status small{font-weight:600;opacity:.75}
.chip-status.new{background:var(--g-soft);color:var(--g)}
.chip-status.conf{background:#e3f2fd;color:#0b5394}
.chip-status.go{background:#fff3cd;color:#8a6d00}
.chip-status.done{background:var(--g-soft);color:var(--g)}
.chip-status.canc{background:#fdecea;color:#b71c1c}
.timeline{display:flex;justify-content:space-between;position:relative;margin:18px 8px 2px}
.timeline::before{content:"";position:absolute;left:5%;right:5%;top:9px;border-top:2px solid var(--line)}
.timeline.off{opacity:.35}
.tstep{position:relative;z-index:1;text-align:center;width:25%}
.tstep .dot{width:18px;height:18px;border-radius:50%;background:#fff;border:2px solid #cfd8cc;margin:0 auto;position:relative}
.tstep.done .dot{border-color:var(--g)}
.tstep.done .dot::after{content:"";position:absolute;inset:2px;border-radius:50%;background:var(--g)}
.tstep small{display:block;margin-top:7px;font-size:11.5px;color:var(--muted)}
.tstep.done small{color:var(--g);font-weight:700}
.oc-items{margin-top:12px;display:flex;flex-direction:column}
.oc-item{display:flex;align-items:center;gap:8px;padding:7px 2px;border-bottom:1px dashed var(--line)}
.oc-item:last-child{border-bottom:0}
.oc-em{font-size:20px;width:26px;text-align:center}
.oc-nm small{color:var(--muted)}
.oc-item b{margin-left:auto;white-space:nowrap}
.oc-foot{display:flex;align-items:center;gap:12px;margin-top:12px;flex-wrap:wrap}
.oc-total{font-size:17px}
.oc-total b{color:var(--g-dark)}
.oc-foot form{margin-left:auto}
.oc-claim{margin-top:12px;background:#fffbe8;border-radius:12px;padding:10px 14px}
.oc-claim summary{cursor:pointer;font-weight:700;color:#8a6d00}
.claim-inline{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.claim-inline textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:10px;font:inherit;resize:vertical}
.claim-inline input[type=file]{font-size:13px}
.co-items{display:flex;flex-direction:column;margin-bottom:6px}
.asm-up{display:flex;gap:8px;margin-top:8px;align-items:center}
.asm-up input[type=file]{font-size:12.5px}
.st-подтверждён{background:#e3f2fd;color:#0b5394}
@media(max-width:720px){
  .oc-foot form{margin-left:0;width:100%}
  .oc-foot .btn{width:100%}
  .tstep small{font-size:10px}
  .asm{max-width:none}
}

/* ═══ кабинет v2 + админ-вкладки ═══ */
/* ── админ-вкладки ── */
.adm-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}
.atab{display:inline-flex;align-items:center;gap:7px;padding:9px 16px;border-radius:999px;
  background:#fff;border:1px solid var(--line);font-weight:700;font-size:14px}
.atab:hover{border-color:var(--g)}
.atab.on{background:var(--g);color:#fff;border-color:var(--g)}
.atab .cnt{background:var(--accent);color:#fff;font-size:11px;font-weight:800;
  min-width:20px;height:20px;border-radius:10px;display:grid;place-items:center;padding:0 5px}
.atab .cnt.red{background:var(--red)}
.row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}

/* ── профиль v2 ── */
.pf-head{display:flex;align-items:center;gap:16px;padding:20px;margin-bottom:16px;flex-wrap:wrap}
.pf-ava{width:64px;height:64px;border-radius:50%;background:var(--g-soft);display:grid;
  place-items:center;font-size:26px;font-weight:800;color:var(--g);flex-shrink:0}
.pf-id b{font-size:19px}
.pf-meta{display:flex;gap:8px;margin-top:6px;flex-wrap:wrap}
.pf-head .btn{margin-left:auto}
.p-card{padding:20px;display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.chip.ok{background:var(--g-soft);border-color:var(--g);color:var(--g)}
.addr-row{display:flex;align-items:center;gap:10px;padding:10px 12px;
  border:1px solid var(--line);border-radius:12px}
.addr-row.on{border-color:var(--g);background:var(--g-soft)}
.addr-txt{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.addr-def{font-size:11px;font-weight:800;color:var(--g);background:#fff;
  border:1px solid var(--g);padding:2px 8px;border-radius:999px;flex-shrink:0}
.addr-btns{margin-left:auto;display:flex;gap:6px;flex-shrink:0}
.addr-btns .btn{padding:6px 10px}
.delx:hover{color:var(--red);border-color:var(--red)}
.addr-add{display:flex;gap:10px;margin-top:4px}
.bd-lock b{font-size:17px}
.bd-form{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.bd-form input[type=date]{max-width:220px}
.saveaddr{font-size:13px;color:var(--muted)}
.addr-mini{font-size:10.5px;color:var(--g);font-weight:800}
.addr-chip{max-width:100%}

/* ── пользователи в админке ── */
.urow{display:flex;align-items:center;gap:14px;padding:14px 16px;margin-bottom:10px;flex-wrap:wrap}
.uinfo{min-width:140px}
.uinfo b{display:block}
.uform{display:flex;gap:10px;align-items:flex-end;margin-left:auto;flex-wrap:wrap}
.uform label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:var(--muted)}
.uform input{width:150px}
.uform input[type=number]{width:110px}
.inlineform{display:inline}

@media(max-width:720px){
  .adm-tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}
  .atab{white-space:nowrap}
  .pf-head .btn{margin-left:0;width:100%}
  .addr-row{flex-wrap:wrap}
  .addr-btns{margin-left:0}
  .uform{margin-left:0}
  .row3{grid-template-columns:1fr}
}

/* ═══ тёмная тема ═══ */
body[data-theme=dark]{--bg:#141a14;--card:#1e281e;--ink:#e4eede;--muted:#93a38d;
  --g-soft:#25381f;--line:#2d3a2c;--shadow:0 1px 2px rgba(0,0,0,.3),0 4px 16px rgba(0,0,0,.35)}
body[data-theme=dark] .topbar{background:#0e150e}
body[data-theme=dark] .search,body[data-theme=dark] .fact,body[data-theme=dark] .bonus-line,
body[data-theme=dark] .asm,body[data-theme=dark] .oc-claim{background:#182018}
body[data-theme=dark] .pd-emoji{background:#182018}
body[data-theme=dark] .btn.to-cart{background:#25301f;color:#e4eede}
body[data-theme=dark] .btn.to-cart:hover{background:var(--g);color:#fff}
body[data-theme=dark] .suggest,body[data-theme=dark] .mobile-nav{background:rgba(24,32,24,.95)}
body[data-theme=dark] .chip-status.done,body[data-theme=dark] .chip-status.new{background:var(--g-soft)}
body[data-theme=dark] img{filter:brightness(.92)}

/* ═══ пакет фич ═══ */
.bell{position:relative}
.bell.ringed{color:var(--accent-dk);animation:swing 2.4s ease-in-out infinite}
@keyframes swing{10%{transform:rotate(14deg)}20%{transform:rotate(-12deg)}30%{transform:rotate(8deg)}40%{transform:rotate(0)}}
.bell-dot{position:absolute;top:14px;right:212px;width:9px;height:9px;border-radius:50%;background:var(--red);z-index:60}
.lowtag{position:absolute;top:8px;left:8px;background:var(--red);color:#fff;font-size:10.5px;
  font-weight:800;padding:3px 8px;border-radius:8px;z-index:2}
.pc-mediawrap{position:relative}
.pc-img{width:100%;height:120px;object-fit:cover;border-radius:14px;display:block}
.pc-emoji{display:block}
.fav-btn{position:absolute;top:8px;right:8px;width:32px;height:32px;border-radius:50%;
  background:rgba(255,255,255,.9);border:1px solid var(--line);color:#b9c2b3;font-size:16px;
  line-height:1;z-index:2;transition:.15s}
.fav-btn:hover{color:var(--red);transform:scale(1.1)}
.fav-btn.on{color:var(--red)}
body[data-theme=dark] .fav-btn{background:rgba(30,40,30,.9)}

.notif-list{display:flex;flex-direction:column;gap:10px;max-width:680px}
.notif{padding:14px 16px}
.notif.unread{border-left:4px solid var(--accent)}
.n-txt{font-weight:600;font-size:14.5px}
.n-meta{display:flex;gap:12px;margin-top:5px;font-size:12.5px}

.lvl-bar{height:8px;background:var(--bg);border-radius:4px;overflow:hidden;margin:8px 0 4px}
.lvl-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--g),var(--accent));border-radius:4px}
.lvl-bronze{background:#f3e6d0;color:#8a5a1f;border-color:#e5cfa8}
.lvl-silver{background:#eceff1;color:#546e7a;border-color:#cfd8dc}
.lvl-gold{background:#fff3cd;color:#8a6d00;border-color:#ffd54f}
.wheel-card{text-align:center}
.wheel-em{font-size:64px;margin:6px 0;transition:transform 1.2s cubic-bezier(.2,.8,.3,1)}
.wheel-em.spin{animation:roll 1.2s linear infinite}
@keyframes roll{to{transform:rotate(360deg)}}
.chlg{border-top:1px dashed var(--line);padding-top:10px}
.chlg:first-of-type{border-top:0;padding-top:0}
.ch-top{display:flex;justify-content:space-between;font-size:14px;font-weight:700}
.chlg.done .ch-top b{color:var(--g)}
.pw-form{display:flex;flex-direction:column;gap:8px}
hr.soft{border:0;border-top:1px dashed var(--line);width:100%}
.cancel-form{margin-top:10px}
.rec-item{display:flex;justify-content:space-between;font-size:13.5px;padding:4px 0;
  border-bottom:1px dashed var(--line)}
.recipe{border-top-color:var(--g)}

/* фикс: рецепты — равная высота карточек, кнопка внизу */
.bundles{align-items:stretch}
.recipe{height:100%}
.recipe .add-recipe{margin-top:auto}
.recipe .b-desc{margin-bottom:4px}

/* ═══ тёмная тема v2 (рабочая) ═══ */
/* ── переопределяем переменные на <html> ── */
[data-theme=dark]{
  --bg:#141a14; --card:#1e281e; --ink:#e4eede; --muted:#93a38d;
  --g-soft:#25381f; --line:#2d3a2c; --red:#e05a56;
  --accent:#e0950f; --accent-dk:#c07f06;
  --shadow:0 1px 2px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.4);
}
/* ── шапка, топбар, футер ── */
[data-theme=dark] .topbar{background:#0e150e}
[data-theme=dark] .header{background:var(--card)}
[data-theme=dark] .search{background:#182018;color:var(--ink)}
[data-theme=dark] .cart-btn{background:var(--card);border-color:var(--line)}
[data-theme=dark] .logo-mark{background:var(--g)}
[data-theme=dark] .footer{background:#101710;color:#b9cbb2}
[data-theme=dark] .footer h4{color:#dcead6}
[data-theme=dark] .copy{border-top-color:rgba(255,255,255,.08)}
/* ── формы и общие элементы ── */
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{
  background:#182018;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .chip{background:var(--card);border-color:var(--line)}
[data-theme=dark] .chip.ok{background:var(--g-soft);color:#9fd29a}
[data-theme=dark] .btn.ghost{background:var(--card);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .btn.to-cart{background:#25301f;color:var(--ink)}
[data-theme=dark] .btn.to-cart:hover{background:var(--g);color:#fff}
[data-theme=dark] .qp{background:var(--g-soft)}
[data-theme=dark] .qp-btn{background:#182018;color:#9fd29a}
[data-theme=dark] .flash{background:var(--g);color:#fff}
[data-theme=dark] .empty{background:var(--card);color:var(--muted)}
/* ── витрина ── */
[data-theme=dark] .pc-mediawrap .fav-btn{background:rgba(30,40,30,.92);border-color:var(--line)}
[data-theme=dark] .pd-emoji{background:#182018}
[data-theme=dark] .fresh-bar{background:#2d3a2c}
/* ── заказы, претензии, профиль ── */
[data-theme=dark] .asm,[data-theme=dark] .fact,[data-theme=dark] .bonus-line{
  background:#182018}
[data-theme=dark] .oc-claim{background:#26241a}
[data-theme=dark] .oc-claim summary{color:#d4b96a}
[data-theme=dark] .addr-row{border-color:var(--line)}
[data-theme=dark] .addr-row.on{background:var(--g-soft);border-color:var(--g)}
[data-theme=dark] .addr-def{background:var(--card);color:#9fd29a}
[data-theme=dark] .cl-reply{background:var(--g-soft);color:var(--ink)}
[data-theme=dark] .bd-lock,[data-theme=dark] .p-stats{color:var(--ink)}
[data-theme=dark] .p-stats span{color:var(--muted)}
[data-theme=dark] .ref-row input{background:#182018;color:var(--ink)}
[data-theme=dark] .lvl-bar{background:#182018}
[data-theme=dark] .chip-status.done,[data-theme=dark] .chip-status.new{background:var(--g-soft);color:#9fd29a}
[data-theme=dark] .chip-status.conf{background:#1a2a3d;color:#7ab8f5}
[data-theme=dark] .chip-status.go{background:#332a12;color:#e0b64f}
[data-theme=dark] .chip-status.canc{background:#3a1c1a;color:#e88}
[data-theme=dark] .tstep .dot{background:var(--card);border-color:#3a4a38}
[data-theme=dark] .timeline::before{border-top-color:#3a4a38}
/* ── админка ── */
[data-theme=dark] .tbl th{background:var(--g-soft);color:var(--ink)}
[data-theme=dark] .tbl td{border-top-color:var(--line)}
[data-theme=dark] .warnrow td{background:#2a2612}
[data-theme=dark] .stat.bad{background:#3a1c1a}
[data-theme=dark] .atab{background:var(--card);border-color:var(--line);color:var(--ink)}
[data-theme=dark] .atab.on{background:var(--g);color:#fff}
[data-theme=dark] .uform label{color:var(--muted)}
/* ── чат, уведомления, отзывы ── */
[data-theme=dark] .chat-box{background:#182018}
[data-theme=dark] .msg{background:#253025;color:var(--ink)}
[data-theme=dark] .msg.me{background:var(--g);color:#fff}
[data-theme=dark] .chat-send input{background:#182018;color:var(--ink)}
[data-theme=dark] .notif{background:var(--card)}
[data-theme=dark] .notif.unread{border-left-color:var(--accent)}
[data-theme=dark] .star{color:#4a5346}
[data-theme=dark] .star.on{color:#f5a623}
[data-theme=dark] .suggest{background:var(--card)}
[data-theme=dark] .suggest a{color:var(--ink)}
[data-theme=dark] .suggest a:hover{background:var(--g-soft)}
[data-theme=dark] .low-stock .chip{background:var(--card)}
[data-theme=dark] .promo-admin input,[data-theme=dark] .claim-inline textarea{
  background:#182018;color:var(--ink)}
[data-theme=dark] .mobile-nav{background:rgba(24,32,24,.94);border-top-color:var(--line)}
[data-theme=dark] .mobile-nav a{color:#7a8a74}
[data-theme=dark] .mobile-nav a.on{color:#9fd29a}
[data-theme=dark] img{filter:brightness(.9)}

/* ═══ тёмная тема: главная ═══ */
/* ── карточка «Путь продукта» ── */
[data-theme=dark] .hero-track{background:var(--card)}
[data-theme=dark] .ht-title{color:var(--muted)}
[data-theme=dark] .ht-live{color:#9fd29a}
[data-theme=dark] .ht-steps::before{border-top-color:#3a4a38}
[data-theme=dark] .stop small{color:var(--muted)}
[data-theme=dark] .fact{background:#182018;border:1px solid var(--line)}
[data-theme=dark] .fact small{color:var(--muted)}
/* ── hero слева: чуть глубже тень, тексты уже светлые ── */
[data-theme=dark] .hero-left{background:linear-gradient(130deg,#0f2a12,#1e5a24);
  box-shadow:0 4px 24px rgba(0,0,0,.45)}
/* ── «Как мы держим свежесть» ── */
[data-theme=dark] .qcard{background:var(--card)}
[data-theme=dark] .qcard p{color:var(--muted)}
[data-theme=dark] .q-emoji{background:var(--g-soft)}
/* ── сезонные чипсы ── */
[data-theme=dark] .chips .chip{background:var(--card)}
/* ── наборы и рецепты ── */
[data-theme=dark] .bundle{background:var(--card)}
[data-theme=dark] .b-total .sum{color:#e0b64f}
[data-theme=dark] .b-item-wrap b{color:#9fd29a}
/* ── плавающие эмодзи: тише в темноте ── */
[data-theme=dark] .float-bg span{opacity:.5 !important;filter:brightness(.7)}
/* ── заголовки-подзаголовки ── */
[data-theme=dark] .sec-sub{color:var(--muted)}

/* ═══ плавность ═══ */
/* плавный скролл по якорям */
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* плавный перекрас при смене темы: класс ставится на 0.45с в момент клика */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after{
  transition:background-color .3s ease,color .3s ease,border-color .3s ease,
             fill .3s ease,box-shadow .3s ease !important}

/* тёмные нативные элементы (скроллбары, дата-пикеры) */
[data-theme=dark]{color-scheme:dark}

/* мягкое появление контента страницы */
.container{animation:pagein .28s ease-out}
@keyframes pagein{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.container{animation:none}}

/* фикс: кнопка темы видна на мобильных */
@media(max-width:720px){
  #theme-btn{display:inline-flex !important;width:40px;height:40px;font-size:16px}
}

/* ═══ toggle-ингредиенты ═══ */
/* карточки одной высоты, низ прижат */
.bundles{align-items:stretch}
.bundle{height:100%}
.bundle .add-bundle,.recipe .add-recipe{margin-top:auto;width:100%}
.b-total{margin-top:auto}

/* ingredient = вся строка-кнопка */
.b-item-wrap{width:100%;border-radius:12px;padding:9px 12px;gap:8px;
  user-select:none;-webkit-user-select:none;transition:background .18s,border-color .18s}
.b-item-wrap input{position:absolute;opacity:0;pointer-events:none}
.b-item-wrap .tname{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;font-weight:600}
.b-item-wrap b{color:var(--g);white-space:nowrap;font-size:14px}
/* кружок-чек */
.b-item-wrap::before{content:"";width:20px;height:20px;border-radius:50%;
  border:2px solid var(--line);flex-shrink:0;transition:.18s;
  background:center/12px no-repeat;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")}
.b-item-wrap:has(input:checked){border-color:var(--g);background:var(--g-soft)}
.b-item-wrap:has(input:checked)::before{background-color:var(--g);border-color:var(--g)}
.b-item-wrap:not(:has(input:checked)){opacity:.62}
.b-item-wrap:hover{border-color:var(--g)}

/* рецепты: строки без чеков — просто список */
.rec-item{display:flex;justify-content:space-between;gap:8px;padding:8px 12px;
  font-size:13.5px;border-bottom:1px dashed var(--line)}
.rec-item:last-of-type{border-bottom:0}

@media(max-width:720px){
  .b-item-wrap{padding:8px 10px}
  .b-item-wrap b{font-size:13px}
}

/* фикс: рецепты = конструктор, как наборы */
.recipe .r-item{width:100%}
.recipe .b-total{margin-top:0}
.recipe .add-recipe{margin-top:auto}
.rec-item{display:none}  /* старые строки больше не нужны */

/* фикс: 5 равных вкладок панели */
@media(max-width:720px){
  .mobile-nav{width:100%;left:0;right:0;overflow:hidden}
  .mobile-nav a{flex:1 1 0 !important;min-width:0 !important}
  .mobile-nav a span{max-width:60px}
}

/* фикс: точка колокольчика внутри ссылки */
.bell{position:relative}
.bell .bell-dot{position:absolute;top:6px;right:7px;width:9px;height:9px;
  border-radius:50%;background:var(--red);border:1.5px solid var(--card)}

/* фикс: панель поверх контента (z-index) */
[data-theme] .mobile-nav, .mobile-nav{z-index:9999 !important;position:fixed !important}
.container{position:static !important}
main.container > *{position:relative;z-index:1}
main.container > section{position:static}
.bundles{position:relative;z-index:1}
.float-bg{z-index:0 !important}
.hero,.qgrid,.chips,.pgrid,.hero-track{position:relative;z-index:1}

/* фикс: стиль согласия ПД */
.pd-consent{display:flex;gap:10px;align-items:flex-start;font-size:13.5px;
  font-weight:500;color:var(--muted);cursor:pointer}
.pd-consent input{width:18px;height:18px;flex-shrink:0;accent-color:var(--g);margin-top:1px}
.pd-consent span{line-height:1.4}

/* ═══ прогресс бесплатной доставки ═══ */
.ship-bar{position:fixed;left:12px;right:12px;bottom:calc(72px + env(safe-area-inset-bottom));
  z-index:55;background:var(--card);border:1px solid var(--line);border-radius:14px;
  padding:8px 14px;box-shadow:var(--shadow);display:none}
.sb-txt{font-size:12.5px;font-weight:700;display:block;margin-bottom:5px}
.sb-txt.done{color:var(--g)}
.sb-txt b{color:var(--accent-dk)}
.sb-track{height:6px;background:var(--bg);border-radius:3px;overflow:hidden}
.sb-fill{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--g));
  border-radius:3px;transition:width .6s cubic-bezier(.2,.8,.3,1)}
.sb-fill.full{background:var(--g)}
@media(min-width:721px){.ship-bar{left:auto;width:340px;right:20px;bottom:20px}}

.sb-big{padding:16px;margin-bottom:14px;display:flex;flex-direction:column;gap:8px}
.sb-big .sb-track{height:9px}
.sb-done{color:var(--g)}
.ship-row{display:flex;justify-content:space-between;font-size:15px}
.ship-row b{color:var(--g)}
.fs-admin{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin-bottom:16px}
.fs-admin label{flex:1;min-width:200px;display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px}
.fs-admin small{width:100%}

/* тост «доставка открыта» */
.ship-toast{position:fixed;left:50%;bottom:calc(130px + env(safe-area-inset-bottom));
  transform:translate(-50%,30px);opacity:0;z-index:9998;
  background:var(--g);color:#fff;font-weight:800;font-size:15px;
  padding:13px 22px;border-radius:999px;box-shadow:0 8px 30px rgba(0,0,0,.3);
  transition:.45s cubic-bezier(.2,.8,.3,1);pointer-events:none;text-align:center}
.ship-toast.show{transform:translate(-50%,0);opacity:1}
@media(min-width:721px){.ship-toast{bottom:90px}}
