:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f1f2f5;
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e7e9ee;
  --accent: #7c3aed;          /* WB фиолетовый */
  --accent-2: #8b5cf6;
  --accent-soft: rgba(124,58,237,.10);
  --accent-ink: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px rgba(16,24,40,.06);
  --glow: 0 0 0 1px rgba(124,58,237,.25), 0 14px 34px rgba(124,58,237,.16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); border-radius: 10px; font-weight: 800; font-size: 13px;
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
}
.logo-text { font-size: 15px; line-height: 1.1; }
.logo-text small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.header-nav { display: flex; align-items: center; gap: 18px; }
.nav-link { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-link:hover { color: var(--ink); }

.lang-switch { display: inline-flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 9px; border-radius: 999px; transition: color .2s ease, background .25s ease; }
.lang:hover { color: var(--ink); }
.lang-active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(124,58,237,.35); }

.balance {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); font-weight: 700; font-size: 14px;
  padding: 5px 12px; border-radius: 999px; box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.cart-link { position: relative; display: inline-flex; align-items: center; }
.cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px;
}

/* Page */
.page { padding: 28px 20px 64px; }
.page-title { font-size: 28px; font-weight: 800; margin: 8px 0 20px; letter-spacing: -.01em; }
.empty { color: var(--muted); }
.empty a { color: var(--accent); }
.muted { color: var(--muted); }

/* Промо-блок акции */
.promo {
  position: relative; overflow: hidden;
  border-radius: 20px; margin: 8px 0 26px; padding: 26px 28px;
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 45%, #9333ea 100%);
  color: #fff; box-shadow: 0 16px 40px rgba(124,58,237,.32);
  animation: page-up .5s ease both;
}
.promo-glow {
  position: absolute; top: -60%; right: -10%; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,.35), transparent 60%);
  pointer-events: none; animation: promo-float 6s ease-in-out infinite;
}
@keyframes promo-float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(20px) scale(1.08); } }
.promo-body { position: relative; z-index: 1; }
.promo-title { font-size: 26px; font-weight: 900; margin: 0 0 8px; letter-spacing: -.01em; }
.promo-lead { font-size: 16px; font-weight: 600; opacity: .95; margin: 0 0 14px; }
.promo-rule {
  display: inline-block; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  padding: 8px 16px; font-weight: 800; font-size: 15px; margin-bottom: 14px;
  backdrop-filter: blur(4px);
}
.promo-text { font-size: 15px; line-height: 1.55; opacity: .95; margin: 0 0 10px; max-width: 760px; }
.promo-cta { font-size: 16px; font-weight: 800; margin: 0; }
.promo-toggle {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
  color: #fff; font-size: 22px; line-height: 1; font-weight: 700;
  display: grid; place-items: center; transition: background .15s;
}
.promo-toggle:hover { background: rgba(255,255,255,.3); }
.promo-collapsible {
  overflow: hidden; max-height: 600px; opacity: 1;
  transition: max-height .35s ease, opacity .25s ease, margin .35s ease;
}
.promo.collapsed { padding: 14px 28px; }
.promo.collapsed .promo-title { margin: 0; font-size: 18px; padding-right: 36px; }
.promo.collapsed .promo-collapsible { max-height: 0; opacity: 0; margin: 0; }
@media (max-width: 560px) {
  .promo { padding: 22px 20px; }
  .promo-title { font-size: 22px; }
  .promo.collapsed { padding: 12px 18px; }
  .promo.collapsed .promo-title { font-size: 16px; }
}

/* Подсветка «сколько не хватает» на карточке */
.card-afford {
  font-size: 12px; font-weight: 700; color: #b25e00;
  background: #fff6e0; border-radius: 8px; padding: 4px 9px; align-self: flex-start;
}
.card-afford.ok { color: #1a7f37; background: #eaf7ee; }

/* Categories */
.categories { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip {
  padding: 8px 16px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted);
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.chip:hover { color: var(--ink); border-color: #d4d7df; }
.chip:active { transform: scale(.96); }
.chip-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s cubic-bezier(.22,.61,.36,1), box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: rgba(124,58,237,.4); }
.card:active { transform: translateY(-1px) scale(.99); }
.card-img { aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.card-name { font-weight: 600; font-size: 15px; }
.card-price {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; font-size: 15px; padding: 6px 13px; border-radius: 999px;
}
.card-price span { font-weight: 700; font-size: 12px; opacity: .75; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border: 1px solid transparent; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, filter .2s ease, background .2s ease, border-color .2s ease; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 18px rgba(124,58,237,.28); }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 8px 22px rgba(124,58,237,.36); }
.btn-primary:active { transform: translateY(1px) scale(.985); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #d4d7df; }
.btn-ghost:active { transform: translateY(1px) scale(.985); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; box-shadow: none; transform: none; }

/* Product page */
.back-link { color: var(--muted); font-size: 14px; font-weight: 600; }
.back-link:hover { color: var(--ink); }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 18px; align-items: start; }
.product-img { background: var(--surface-2); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); animation: media-in .5s cubic-bezier(.22,.61,.36,1) both; }
.product-img img { width: 100%; height: auto; display: block; }
.product-info { animation: info-in .5s cubic-bezier(.22,.61,.36,1) .06s both; }
.product-name { font-size: 26px; font-weight: 800; margin: 4px 0 14px; }
.product-price {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 22px; font-weight: 800; padding: 8px 18px; border-radius: 999px;
  margin-bottom: 18px;
}
.product-price span { font-size: 14px; font-weight: 700; opacity: .75; }
.product-desc { color: var(--muted); margin-bottom: 24px; }
@keyframes media-in { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes info-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* Forms / auth */
.auth-card { max-width: 420px; margin: 24px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.auth-title { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 20px; }
.auth-hint { margin-top: 16px; font-size: 13px; color: var(--muted); }
.auth-hint a { color: var(--accent); }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: #fff; color: var(--ink); transition: border-color .2s ease, box-shadow .25s ease; }
.input::placeholder { color: #9aa1ad; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field:focus-within .field-label { color: var(--accent); transition: color .2s ease; }
select.input option { background: #fff; color: var(--ink); }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fdecec; color: #b42318; border: 1px solid #f7c9c6; }
.alert-success { background: #eaf7ee; color: #1a7f37; border: 1px solid #bfe6c9; }

/* Cabinet */
.cabinet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.balance-box { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-radius: var(--radius); padding: 16px 24px; text-align: center; min-width: 120px; box-shadow: 0 10px 26px rgba(124,58,237,.3); }
.balance-num { font-size: 30px; font-weight: 800; line-height: 1; }
.balance-cap { font-size: 13px; font-weight: 600; margin-top: 4px; opacity: .92; }
.cabinet-actions { display: flex; gap: 12px; margin: 20px 0 8px; flex-wrap: wrap; }
.cabinet-actions form { margin: 0; }
.section-title { font-size: 18px; font-weight: 800; margin: 28px 0 14px; }
.orders { display: flex; flex-direction: column; gap: 14px; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.order-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.order-id { font-weight: 700; }
.order-date { color: var(--muted); font-size: 13px; }
.order-items { margin: 10px 0; padding-left: 18px; }
.order-total { color: var(--muted); }
.badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-left: auto; }
.badge-new { background: #eef2ff; color: #4f46e5; }
.badge-processing { background: #fff6e0; color: #b25e00; }
.badge-done { background: #eaf7ee; color: #1a7f37; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }

/* Cart */
.cart { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.cart-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; transition: border-color .2s ease; }
.cart-row:hover { border-color: #d4d7df; }
.cart-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.cart-info { flex: 1; }
.cart-name { font-weight: 600; }
.cart-sub { font-weight: 800; }
.cart-del { margin: 0; }
.link-danger { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 16px; padding: 4px 8px; transition: color .15s ease, transform .12s ease; }
.link-danger:hover { color: #b42318; }
.link-danger:active { transform: scale(.85); }
.cart-footer { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cart-total { font-size: 18px; }

/* Admin */
.admin-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.admin-bar form { margin: 0; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tab { padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.admin-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: rgba(124,58,237,.04); }
.table-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.row-actions { display: flex; gap: 12px; align-items: center; }
.row-actions form { margin: 0; }
.link { color: var(--accent); font-weight: 600; }
.link-danger-text { background: none; border: none; cursor: pointer; color: #b42318; font-weight: 600; font-size: 14px; padding: 0; }
.form-wide { max-width: 640px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }
.form-thumb { margin-top: 8px; width: 80px; height: 80px; border-radius: 10px; object-fit: cover; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checkbox input { accent-color: var(--accent); }
.inline-form { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 160px; }
.input-sm { padding: 7px 10px; font-size: 14px; }
.order-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.status-form { display: flex; gap: 8px; align-items: center; margin: 0; }

/* Водители */
.drivers-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.drivers-toolbar .inline-form { margin-bottom: 0; }
.points-pill { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 800; padding: 3px 12px; border-radius: 999px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0 12px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.panel .form { margin-top: 6px; }
.subtitle { font-size: 14px; font-weight: 700; color: var(--muted); margin: 22px 0 10px; text-transform: uppercase; letter-spacing: .03em; }
.adj-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adj-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.adj-row:last-child { border-bottom: none; }
.adj-delta { font-weight: 800; }
.adj-delta.plus { color: #1a7f37; }
.adj-delta.minus { color: #b42318; }
.adj-date { grid-column: 2 / -1; font-size: 12px; }

/* WB синхронизация */
.wb-status { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.wb-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.wb-stat span { font-size: 12px; }
.wb-stat b { font-size: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; }
.site-footer .container { padding-top: 20px; padding-bottom: 20px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-contacts { display: flex; flex-direction: column; gap: 8px; text-align: right; }
.footer-contact { color: var(--muted); }
a.footer-contact:hover { color: var(--accent); }
.footer-socials { display: flex; gap: 10px; flex-wrap: wrap; }
.social { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; transition: .15s; }
.social svg { flex-shrink: 0; }
.social:hover { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }

/* ===== Анимации появления ===== */
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.grid .card { opacity: 0; animation: card-in .5s cubic-bezier(.22,.61,.36,1) forwards; }
.grid .card:nth-child(1){animation-delay:.03s}.grid .card:nth-child(2){animation-delay:.08s}
.grid .card:nth-child(3){animation-delay:.13s}.grid .card:nth-child(4){animation-delay:.18s}
.grid .card:nth-child(5){animation-delay:.23s}.grid .card:nth-child(6){animation-delay:.28s}
.grid .card:nth-child(7){animation-delay:.33s}.grid .card:nth-child(8){animation-delay:.38s}
.grid .card:nth-child(n+9){animation-delay:.42s}

@keyframes page-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.page-title, .auth-card, .cart, .cart-footer, .orders, .cabinet-head { animation: page-up .45s ease both; }
.cart-footer { animation-delay: .08s; }

.badge { animation: badge-in .4s ease both; }
@keyframes badge-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: translateX(0); } }
.badge-processing { animation: badge-in .4s ease both, pulse-soft 2.4s ease-in-out 1s infinite; }
@keyframes pulse-soft { 0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); } 50% { box-shadow: 0 0 0 4px rgba(245,158,11,.18); } }

/* ===== Добавление в корзину: тост + «полёт» + bump бейджа ===== */
.cart-badge.bump { animation: badge-pop .5s cubic-bezier(.5,1.6,.5,1); }
@keyframes badge-pop { 0% { transform: scale(1); } 35% { transform: scale(1.5); } 100% { transform: scale(1); } }

.fly-img {
  position: fixed; z-index: 1000; border-radius: 12px; object-fit: cover;
  pointer-events: none; box-shadow: 0 10px 30px rgba(16,24,40,.25);
  transition: left .75s cubic-bezier(.5,-0.2,.7,1), top .75s cubic-bezier(.5,-0.2,.7,1),
              width .75s ease, height .75s ease, opacity .75s ease, transform .75s ease;
}

.toast-wrap { position: fixed; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; z-index: 1001; pointer-events: none; }
.toast {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px;
  padding: 12px 18px; border-radius: 999px; box-shadow: 0 12px 30px rgba(16,24,40,.3);
  transform: translateY(20px); opacity: 0; transition: transform .3s cubic-bezier(.22,.61,.36,1), opacity .3s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast .tick { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: #22c55e; color: #fff; font-size: 12px; }

/* ===== Успешное оформление заказа ===== */
.order-success {
  position: fixed; inset: 0; z-index: 1002; display: grid; place-items: center;
  background: rgba(255,255,255,.7); backdrop-filter: blur(4px);
  animation: fade-in .25s ease both;
}
.order-success .card-pop {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 36px 40px; text-align: center; box-shadow: var(--glow);
  animation: pop-in .5s cubic-bezier(.5,1.6,.5,1) both;
}
.order-success h2 { margin: 16px 0 6px; font-size: 22px; font-weight: 800; }
.order-success p { margin: 0; color: var(--muted); }
.success-check { width: 76px; height: 76px; margin: 0 auto; }
.success-check circle { stroke: var(--accent); stroke-width: 5; fill: none; stroke-dasharray: 251; stroke-dashoffset: 251; animation: draw-circle .5s ease forwards; }
.success-check path { stroke: var(--accent); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw-check .35s .45s ease forwards; }
@keyframes draw-circle { to { stroke-dashoffset: 0; } }
@keyframes draw-check { to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(.8); } 100% { opacity: 1; transform: scale(1); } }

/* ===== Бомбическая анимация начисления баллов ===== */
.accrual-overlay {
  position: fixed; inset: 0; z-index: 1003; display: grid; place-items: center;
  background: rgba(20,16,40,.45); backdrop-filter: blur(3px);
  animation: fade-in .25s ease both;
}
.accrual-overlay.fade { animation: fade-out .4s ease both; }
@keyframes fade-out { to { opacity: 0; } }
.accrual-card {
  position: relative; z-index: 2; text-align: center; color: #fff;
  background: linear-gradient(150deg, #7c3aed, #8b5cf6);
  border-radius: 24px; padding: 32px 44px;
  box-shadow: 0 24px 70px rgba(124,58,237,.55);
  animation: accrual-pop .6s cubic-bezier(.34,1.56,.64,1) both;
}
.accrual-emoji { font-size: 46px; animation: emoji-bounce .8s ease both; }
.accrual-plus {
  font-size: 64px; font-weight: 900; line-height: 1; margin: 6px 0 8px;
  text-shadow: 0 4px 16px rgba(0,0,0,.25);
  animation: plus-pop .7s cubic-bezier(.34,1.56,.64,1) .1s both;
}
.accrual-text { font-size: 18px; font-weight: 600; opacity: .96; }
.accrual-text b { font-weight: 900; }
.accrual-sub { font-size: 15px; opacity: .85; margin-top: 4px; }
@keyframes accrual-pop { 0% { opacity: 0; transform: scale(.6) translateY(20px); } 100% { opacity: 1; transform: none; } }
@keyframes plus-pop { 0% { transform: scale(0); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes emoji-bounce { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.3) rotate(10deg); } 100% { transform: scale(1) rotate(0); } }

.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.confetti i {
  position: absolute; top: -16px; width: 11px; height: 11px; display: block;
  animation-name: confetti-fall; animation-timing-function: linear; animation-iteration-count: 1;
}
@keyframes confetti-fall {
  0% { top: -16px; opacity: 1; }
  100% { top: 105%; opacity: .9; }
}

/* Доступность / тач */
a, button, .chip, .card, .lang, .admin-tab, .social { -webkit-tap-highlight-color: transparent; }
:where(a, button, .chip, .card, .lang, .admin-tab, .social):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); border-radius: 10px; }

@media (max-width: 720px) { .admin-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .product { grid-template-columns: 1fr; gap: 18px; } .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .logo-text { display: none; }
  .page-title { font-size: 23px; }
  .header-inner { height: 56px; }
  .header-nav { gap: 10px; }
  .nav-link { font-size: 14px; }
  .header-nav .nav-link:not(.cart-link) { display: none; }
  .balance { padding: 4px 8px; font-size: 13px; }
  .footer-contacts { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .grid .card, .page-title, .auth-card, .cart, .cart-footer, .orders, .cabinet-head, .badge { opacity: 1 !important; transform: none !important; }
  .fly-img { display: none !important; }
}
