/* =========================================================
   Minishop — витрина. Сине-зелёная тема.
   ========================================================= */
:root {
  --bg: #050d18;
  --bg-2: #081626;
  --surface: rgba(13, 31, 51, .62);
  --surface-2: rgba(18, 42, 68, .7);
  --surface-solid: #0c1c2e;
  --line: rgba(120, 200, 255, .12);
  --line-2: rgba(120, 220, 255, .22);
  --text: #e9f5ff;
  --text-2: #b9cee3;
  --muted: #7f9bb8;
  --blue: #2ea8ff;
  --cyan: #33d6ff;
  --green: #1fe0a0;
  --lime: #8cf5c4;
  --warn: #ffc75a;
  --bad: #ff6b81;
  --grad: linear-gradient(135deg, #2ea8ff 0%, #22d3d6 50%, #1fe0a0 100%);
  --grad-soft: linear-gradient(135deg, rgba(46,168,255,.18), rgba(31,224,160,.18));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6), 0 0 0 1px var(--line);
  --glow: 0 10px 40px -10px rgba(46, 168, 255, .55);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-h: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: var(--lime); }
h1, h2, h3, h4 { font-family: var(--font-h); font-weight: 700; line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.6vw, 54px); }
h2, .h2 { font-size: clamp(22px, 3vw, 34px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.hidden { display: none !important; }
.center { text-align: center; justify-content: center; }
.mt-l { margin-top: 36px; } .mt-xl { margin-top: 64px; } .pt-0 { padding-top: 0 !important; }

.ic { width: 22px; height: 22px; flex: none; }
.ic-sm { width: 17px; height: 17px; }
.ic-xs { width: 14px; height: 14px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 22px; }
.container.narrow { max-width: 860px; }
.main { flex: 1; position: relative; z-index: 1; }

/* ---------- Фон ---------- */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 22s ease-in-out infinite alternate; }
.o1 { width: 620px; height: 620px; background: #0f6fd6; top: -220px; left: -160px; }
.o2 { width: 520px; height: 520px; background: #0db487; top: 20%; right: -200px; animation-delay: -6s; opacity: .38; }
.o3 { width: 460px; height: 460px; background: #1597c9; bottom: -220px; left: 30%; animation-delay: -12s; opacity: .3; }
.grid-fx {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(120,200,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(120,200,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes drift { to { transform: translate(60px, 40px) scale(1.08); } }

/* ---------- Кнопки ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--h); padding: 0 22px; border-radius: 13px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform .18s, box-shadow .25s, background .25s, border-color .25s, color .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { --h: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn-lg { --h: 54px; padding: 0 28px; font-size: 16px; border-radius: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn-primary { background: var(--grad); color: #03202a; box-shadow: var(--glow); background-size: 160% 160%; }
.btn-primary:hover { color: #03202a; background-position: 100% 50%; box-shadow: 0 14px 44px -8px rgba(31, 224, 160, .6); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--text); border-color: rgba(51,214,255,.5); }
.btn-light { background: #fff; color: #062033; }
.btn-light:hover { color: #062033; transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(255,255,255,.5); }
.btn-tg { background: linear-gradient(135deg, #2aabee, #229ed9); color: #fff; box-shadow: 0 10px 30px -10px rgba(42,171,238,.7); }
.btn-tg:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.08); }
.btn-danger { background: rgba(255,107,129,.12); color: var(--bad); border-color: rgba(255,107,129,.3); }

.icon-btn {
  position: relative; width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text);
  cursor: pointer; transition: .2s;
}
.icon-btn:hover { border-color: var(--line-2); background: rgba(255,255,255,.07); color: var(--text); }
.icon-btn.danger:hover { color: var(--bad); border-color: rgba(255,107,129,.4); }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(5, 13, 24, .72); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-family: var(--font-h); font-weight: 700; font-size: 20px; }
.logo:hover { color: var(--text); }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad); color: #04222c; box-shadow: var(--glow);
}
.logo-mark { overflow: hidden; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.header .logo-mark { width: 44px; height: 44px; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 14px; border-radius: 10px;
  color: var(--text-2); font-weight: 600; font-size: 15px; background: none; border: 0; cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,.05); }
.nav-drop { position: relative; }
.drop-panel {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 460px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  padding: 14px; border-radius: var(--radius); background: rgba(9, 24, 40, .96); border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.nav-drop:hover .drop-panel, .nav-drop:focus-within .drop-panel { opacity: 1; visibility: visible; transform: none; }
.nav-drop::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.drop-col { padding: 6px; border-radius: 12px; }
.drop-title { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); padding: 8px; border-radius: 10px; }
.drop-title:hover { background: rgba(255,255,255,.05); color: var(--text); }
.drop-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: var(--cyan); border: 1px solid var(--line-2); }
.drop-ic .ic { width: 18px; height: 18px; }
.drop-item { display: block; padding: 7px 10px 7px 52px; color: var(--text-2); border-radius: 9px; font-size: 14.5px; }
.drop-item:hover { color: var(--text); background: rgba(255,255,255,.04); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--grad); color: #03202a; font-size: 11.5px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 0 3px var(--bg);
}
.cart-count.bump { animation: bump .45s; }
@keyframes bump { 40% { transform: scale(1.35); } }
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 12px 0 5px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; }
.user-chip:hover { border-color: var(--line-2); }
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14.5px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #03202a; font-weight: 800; font-size: 13px; flex: none; }
.avatar-lg { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.user-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 8px; border-radius: 14px;
  background: rgba(9, 24, 40, .97); border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.user-menu:hover .user-panel, .user-menu:focus-within .user-panel { opacity: 1; visibility: visible; transform: none; }
.user-menu::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.user-panel a, .user-panel button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); background: none; border: 0; cursor: pointer; font-size: 14.5px; text-align: left;
}
.user-panel a:hover, .user-panel button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.user-panel .ic { width: 18px; height: 18px; }
.burger { display: none; }
.mobile-nav { display: none; }

/* ---------- Алерты ---------- */
.flash-wrap { padding-top: 18px; }
.alert { padding: 13px 16px; border-radius: 13px; border: 1px solid; margin-bottom: 10px; font-weight: 600; font-size: 14.5px; }
.alert-ok { background: rgba(31,224,160,.1); border-color: rgba(31,224,160,.35); color: var(--lime); }
.alert-bad { background: rgba(255,107,129,.1); border-color: rgba(255,107,129,.35); color: #ffb3bf; }
.alert-warn { background: rgba(255,199,90,.1); border-color: rgba(255,199,90,.35); color: #ffe0a3; }
.alert-info { background: rgba(46,168,255,.1); border-color: rgba(46,168,255,.35); color: #b8e1ff; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px;
  background: rgba(46,168,255,.1); border: 1px solid var(--line-2); color: var(--cyan);
  font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(31,224,160,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(31,224,160,0); } 100% { box-shadow: 0 0 0 0 rgba(31,224,160,0); } }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--text-2); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 36px; }
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats div {
  padding: 14px 18px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; min-width: 140px; backdrop-filter: blur(8px);
}
.hero-stats b { font-family: var(--font-h); font-size: 22px; }
.hero-stats span { color: var(--muted); font-size: 13px; }

.hero-art { position: relative; aspect-ratio: 1; max-width: 500px; justify-self: center; width: 100%; }
.art-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(51,214,255,.28); animation: spin 40s linear infinite; }
.art-ring.r2 { inset: 14%; border-style: solid; border-color: rgba(31,224,160,.18); animation-duration: 28s; animation-direction: reverse; }
.art-ring::before { content: ''; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 20px var(--cyan); }
.art-ring.r2::before { background: var(--green); box-shadow: 0 0 20px var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }
.art-core { position: absolute; inset: 26%; border-radius: 34%; display: grid; place-items: center; background: radial-gradient(circle, rgba(46,168,255,.35), transparent 70%); }
.art-gem { width: 100%; filter: drop-shadow(0 20px 40px rgba(31,224,160,.45)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px) rotate(-2deg); } }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 11px; padding: 12px 15px; border-radius: 15px;
  background: rgba(10, 26, 44, .82); border: 1px solid var(--line-2); backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); animation: float 7s ease-in-out infinite;
}
.float-card .ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--grad); color: #03202a; }
.float-card b { display: block; font-size: 14px; }
.float-card span { font-size: 12px; color: var(--muted); }
.fc1 { top: 8%; left: -4%; } .fc2 { top: 46%; right: -6%; animation-delay: -2s; } .fc3 { bottom: 6%; left: 6%; animation-delay: -4s; }

/* ---------- Секции ---------- */
.section { padding: 56px 0; position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head.center { justify-content: center; text-align: center; }
.section-head h2, .section-head h1 { margin: 0; }
.section-head .eyebrow { margin-bottom: 12px; }

/* Категории */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.cat-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 280px; padding: 30px;
  border-radius: 24px; color: var(--text); isolation: isolate;
  background: linear-gradient(150deg, rgba(20, 70, 120, .55), rgba(8, 28, 46, .8));
  border: 1px solid var(--line-2); transition: transform .3s, box-shadow .3s, border-color .3s;
}
.cat-card.v1 { background: linear-gradient(150deg, rgba(10, 110, 90, .5), rgba(8, 28, 46, .85)); }
.cat-card.v2 { background: linear-gradient(150deg, rgba(30, 90, 160, .5), rgba(10, 60, 60, .8)); }
.cat-card::before {
  content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: var(--grad); filter: blur(60px); opacity: .35; z-index: -1; transition: .4s;
}
.cat-card:hover { transform: translateY(-4px); color: var(--text); border-color: rgba(51,214,255,.5); box-shadow: 0 30px 60px -25px rgba(46,168,255,.55); }
.cat-card:hover::before { opacity: .6; transform: scale(1.15); }
.cat-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .35; }
.cat-shine { position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.07) 45%, transparent 60%); transform: translateX(-100%); transition: transform .9s; }
.cat-card:hover .cat-shine { transform: translateX(100%); }
.cat-ic { width: 60px; height: 60px; border-radius: 17px; display: grid; place-items: center; background: var(--grad); color: #03202a; margin-bottom: 22px; box-shadow: var(--glow); }
.cat-ic .ic { width: 30px; height: 30px; }
.cat-card h3 { font-size: 26px; margin-bottom: 8px; }
.cat-card p { color: var(--text-2); max-width: 420px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.cat-go { position: absolute; top: 30px; right: 30px; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; color: var(--cyan); }

/* Товары */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.pcard {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(10px);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.pcard:hover { transform: translateY(-4px); border-color: rgba(51,214,255,.4); box-shadow: 0 24px 50px -25px rgba(46,168,255,.6); }
.pcard-media { position: relative; aspect-ratio: 4/3; display: block; overflow: hidden; background: linear-gradient(140deg, #0e3558, #0a3b3b); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pcard:hover .pcard-media img { transform: scale(1.06); }
.pcard-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(140, 245, 196, .9);
  background: radial-gradient(circle at 30% 20%, rgba(46,168,255,.45), transparent 55%), radial-gradient(circle at 80% 90%, rgba(31,224,160,.4), transparent 50%), linear-gradient(140deg, #0d2f50, #083a35); }
.pcard-ph .ic { width: 64px; height: 64px; stroke-width: 1.3; filter: drop-shadow(0 8px 20px rgba(31,224,160,.5)); }
.pcard-ph.big .ic { width: 140px; height: 140px; }
.badge { position: absolute; top: 12px; left: 12px; padding: 5px 11px; border-radius: 9px; background: var(--grad); color: #03202a; font-weight: 800; font-size: 12.5px; box-shadow: 0 6px 18px -6px rgba(31,224,160,.8); }
.badge-lg { font-size: 14px; padding: 7px 14px; top: 18px; left: 18px; }
.pcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.pcard-cat { color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.pcard-title { color: var(--text); font-weight: 800; font-size: 17px; margin: 4px 0 4px; line-height: 1.3; }
.pcard-title:hover { color: var(--lime); }
.pcard-desc { color: var(--muted); font-size: 14px; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { font-family: var(--font-h); font-weight: 700; font-size: 20px; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 14px; }
.price-lg .price-now { font-size: 34px; }
.price-lg .price-old { font-size: 17px; }
.discount { padding: 3px 9px; border-radius: 8px; background: rgba(31,224,160,.15); color: var(--green); font-weight: 800; font-size: 14px; }

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.step { position: relative; padding: 26px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.step > .ic { width: 46px; height: 46px; padding: 11px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--line-2); color: var(--cyan); margin-bottom: 16px; }
.step-n { position: absolute; right: 16px; top: 8px; font-family: var(--font-h); font-size: 54px; font-weight: 800; color: rgba(120,200,255,.07); }
.step h3 { font-size: 17px; }
.step p { color: var(--muted); font-size: 14.5px; margin: 0; }

.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 40px 44px; border-radius: 26px; background: var(--grad); color: #03202a; position: relative; overflow: hidden;
}
.cta-band::after { content: ''; position: absolute; right: -60px; top: -100px; width: 320px; height: 320px; border-radius: 50%; border: 40px solid rgba(255,255,255,.15); }
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { margin: 0; font-weight: 600; opacity: .85; }

/* ---------- Страница категории ---------- */
.page-hero { padding: 44px 0 28px; }
.page-hero-row { display: flex; align-items: center; gap: 20px; margin-top: 14px; }
.page-hero-ic { width: 72px; height: 72px; flex: none; border-radius: 20px; display: grid; place-items: center; background: var(--grad); color: #03202a; box-shadow: var(--glow); }
.page-hero-ic .ic { width: 36px; height: 36px; }
.page-hero h1 { font-size: clamp(26px, 3.6vw, 42px); margin: 0 0 4px; }
.page-hero .lead { margin: 0; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--cyan); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: 14.5px; }
.tab:hover { color: var(--text); border-color: var(--line-2); }
.tab.active { background: var(--grad); color: #03202a; border-color: transparent; box-shadow: var(--glow); }
select, .sort select {
  height: 42px; padding: 0 38px 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-solid);
  appearance: none; cursor: pointer; font-weight: 600; font-size: 14.5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2333d6ff' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}

.empty { text-align: center; padding: 70px 20px; border-radius: 24px; border: 1px dashed var(--line-2); background: rgba(255,255,255,.02); }
.empty-ic { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; background: var(--grad-soft); color: var(--cyan); border: 1px solid var(--line-2); }
.empty-ic .ic { width: 36px; height: 36px; }
.empty p { color: var(--muted); }

/* ---------- Карточка товара ---------- */
.product-layout { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: start; }
.product-media { position: sticky; top: calc(var(--header-h) + 20px); aspect-ratio: 1; border-radius: 26px; overflow: hidden; border: 1px solid var(--line-2); background: #0b2742; box-shadow: 0 40px 80px -40px rgba(46,168,255,.6); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(26px, 3.4vw, 40px); margin: 6px 0 10px; }
.buy-box { margin: 24px 0; padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); backdrop-filter: blur(10px); }
.buy-form { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.grow { flex: 1; min-width: 180px; }
.qty { display: inline-flex; align-items: center; height: 54px; border-radius: 15px; border: 1px solid var(--line-2); background: rgba(0,0,0,.2); overflow: hidden; }
.qty button { width: 46px; height: 100%; border: 0; background: none; color: var(--text); cursor: pointer; display: grid; place-items: center; transition: .15s; }
.qty button:hover { background: rgba(255,255,255,.07); color: var(--cyan); }
.qty button .ic { width: 18px; height: 18px; }
.qty input { width: 64px; height: 100%; border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; border-radius: 0; text-align: center; font-weight: 800; font-size: 17px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; }
.qty-sm { height: 42px; border-radius: 12px; }
.qty-sm button { width: 36px; }
.qty-sm input { width: 52px; font-size: 15px; }
.perks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-2); font-size: 14px; }
.perks li { display: inline-flex; align-items: center; gap: 7px; }
.perks .ic { color: var(--green); }
.perks.center { justify-content: center; margin-top: 22px; }

.ptabs { border-radius: 22px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.ptabs-head { display: flex; border-bottom: 1px solid var(--line); }
.ptabs-head button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 700; position: relative; }
.ptabs-head button.active { color: var(--text); }
.ptabs-head button.active::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 3px; border-radius: 3px; background: var(--grad); }
.ptab { display: none; padding: 22px 24px; }
.ptab.active { display: block; animation: fade .3s; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

.prose { color: var(--text-2); }
.prose h1 { color: var(--text); font-size: clamp(26px, 3.2vw, 36px); }
.prose h2 { color: var(--text); font-size: 20px; margin: 1.6em 0 .6em; }
.prose ul { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.prose li::before { content: ''; position: absolute; left: 4px; top: 9px; width: 9px; height: 9px; border-radius: 3px; background: var(--grad); transform: rotate(45deg); }
.prose strong { color: var(--text); }

/* ---------- Корзина ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; backdrop-filter: blur(10px); }
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-row { display: grid; grid-template-columns: 84px 1fr auto 110px auto; align-items: center; gap: 16px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: opacity .3s; }
.cart-row.removing { opacity: 0; transform: translateX(20px); }
.cart-thumb { position: relative; width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: #0b2742; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .pcard-ph .ic { width: 36px; height: 36px; }
.cart-info { display: flex; flex-direction: column; min-width: 0; }
.cart-title { color: var(--text); font-weight: 800; font-size: 16px; }
.cart-sum { font-family: var(--font-h); font-weight: 700; text-align: right; }
.checkout { position: sticky; top: calc(var(--header-h) + 20px); }
.sum-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); color: var(--text-2); }
.sum-row.total { font-size: 18px; color: var(--text); border-bottom: 0; margin-bottom: 14px; }
.sum-row.total b { font-family: var(--font-h); font-size: 24px; }
.note { display: flex; gap: 7px; margin-top: 14px; }

.form .field { margin-bottom: 15px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=number], input[type=email], input[type=password], input:not([type]), textarea, .copy-input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0,0,0,.25);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(51,214,255,.14); }
textarea { resize: vertical; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); margin-bottom: 18px; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--green); margin-top: 2px; flex: none; }

/* ---------- Заказы ---------- */
.profile-card { display: flex; align-items: center; gap: 18px; }
.profile-card h1 { margin: 0; }
.orders-list { display: flex; flex-direction: column; gap: 10px; }
.order-row { display: grid; grid-template-columns: 1fr auto 140px 24px; align-items: center; gap: 16px; padding: 18px 22px; color: var(--text); transition: .2s; }
.order-row:hover { color: var(--text); border-color: var(--line-2); transform: translateX(3px); }
.order-row > div { display: flex; flex-direction: column; }
.order-row > b { text-align: right; font-family: var(--font-h); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-warn { background: rgba(255,199,90,.12); color: var(--warn); }
.status-info { background: rgba(46,168,255,.14); color: #79c6ff; }
.status-ok { background: rgba(31,224,160,.14); color: var(--green); }
.status-bad { background: rgba(255,107,129,.13); color: var(--bad); }
.status-muted { background: rgba(255,255,255,.06); color: var(--muted); }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.order-head h1 { margin: 0 0 4px; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 26px; }
.pstep { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; position: relative; }
.pstep::before { content: ''; position: absolute; top: 17px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: -1; }
.pstep:first-child::before { display: none; }
.pstep span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); background: var(--surface-solid); font-weight: 800; }
.pstep.on { color: var(--text); }
.pstep.on span { background: var(--grad); color: #03202a; border-color: transparent; }
.pstep.on::before { background: var(--green); }
.order-items { border-top: 1px solid var(--line); }
.oi { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.oi-thumb { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--grad-soft); color: var(--cyan); flex: none; }
.oi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.oi-name { flex: 1; font-weight: 600; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; margin: 10px 0 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- Вход ---------- */
.login-card { max-width: 480px; margin: 20px auto; text-align: center; padding: 40px 34px; }
.login-ic { width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(135deg, #2aabee, #1fe0a0); color: #fff; box-shadow: 0 20px 40px -15px rgba(42,171,238,.8); }
.login-ic .ic { width: 42px; height: 42px; }
.login-card .btn { margin-top: 14px; }
.login-status { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 14.5px; }
.login-status.ok { color: var(--green); }
.login-status.bad { color: var(--bad); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--cyan); animation: spin .8s linear infinite; }
.login-help { margin-top: 18px; text-align: left; font-size: 14px; color: var(--muted); }
.login-help summary { cursor: pointer; text-align: center; color: var(--text-2); }
.copy-input { margin-top: 6px; font-size: 13px; }

/* ---------- Документы ---------- */
.doc-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.doc-nav { position: sticky; top: calc(var(--header-h) + 20px); padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.doc-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 14.5px; }
.doc-nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.doc-nav a.active { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.doc { padding: 36px 40px; }

/* ---------- Пагинация ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.pagination a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--line); color: var(--text-2); font-weight: 700; }
.pagination a.active { background: var(--grad); color: #03202a; border-color: transparent; }

/* ---------- Подвал ---------- */
.footer { position: relative; z-index: 1; margin-top: 60px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(8,22,38,.4), rgba(5,13,24,.95)); padding: 54px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1fr; gap: 32px; }
.footer h4 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin-bottom: 16px; }
.footer a:not(.logo) { display: flex; align-items: center; gap: 7px; color: var(--text-2); padding: 5px 0; font-size: 15px; }
.footer a:not(.logo):hover { color: var(--cyan); }
.footer-brand p { color: var(--muted); margin: 16px 0; max-width: 340px; font-size: 14.5px; }
.footer-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-badges span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.footer-badges .ic { color: var(--green); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 14px; max-width: calc(100% - 32px);
  background: rgba(10, 30, 50, .96); border: 1px solid rgba(31,224,160,.45); box-shadow: 0 20px 50px -15px rgba(0,0,0,.8);
  font-weight: 700; transition: .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255,107,129,.5); }
.toast .ic { color: var(--green); }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .nav-cat { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav { display: none; }
  .burger { display: inline-grid; }
  .user-name { display: none; }
  .user-chip { padding-right: 8px; }
  .mobile-nav {
    display: flex; flex-direction: column; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 49;
    padding: 14px 18px 30px; background: rgba(5, 13, 24, .97); backdrop-filter: blur(16px); overflow-y: auto;
    transform: translateY(-10px); opacity: 0; visibility: hidden; transition: .25s;
  }
  .mobile-nav.open { transform: none; opacity: 1; visibility: visible; }
  .mobile-nav a { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 12px; color: var(--text); font-weight: 700; border-bottom: 1px solid var(--line); }
  .mobile-nav a.m-sub { padding-left: 46px; font-weight: 600; color: var(--text-2); }
  .hero { padding-top: 36px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 360px; order: -1; }
  .float-card { transform: scale(.85); }
  .product-layout, .cart-layout, .doc-layout { grid-template-columns: 1fr; }
  .product-media, .checkout, .doc-nav { position: static; }
  .doc { padding: 26px 22px; }
}
@media (max-width: 620px) {
  .fc2 { display: none; }
  .container { padding: 0 16px; }
  .btn-tg.btn-sm span { display: none; }
  .btn-tg.btn-sm { width: 44px; padding: 0; height: 44px; }
  .section { padding: 40px 0; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { padding: 24px; min-height: 240px; }
  .cat-go { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pcard-body { padding: 12px; }
  .pcard-title { font-size: 15px; }
  .pcard-desc { display: none; }
  .price-now { font-size: 16px; }
  .pcard-foot .btn-icon { --h: 40px; }
  .steps { grid-template-columns: 1fr; }
  .hero-stats div { flex: 1; min-width: 0; padding: 12px; }
  .hero-stats b { font-size: 17px; }
  .cart-row { grid-template-columns: 64px 1fr auto; grid-template-areas: "t i x" "t q s"; gap: 10px 12px; }
  .cart-thumb { width: 64px; height: 64px; grid-area: t; }
  .cart-info { grid-area: i; }
  .cart-row > form:last-child { grid-area: x; }
  .cart-row .qty { grid-area: q; }
  .cart-sum { grid-area: s; }
  .order-row { grid-template-columns: 1fr auto; }
  .order-row > .ic { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 30px 24px; }
  .fc2 { right: 0; }
  .fc1 { left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Иконка пользователя */
.avatar { background: linear-gradient(160deg, #eaf6ff, #c9e6f7) !important; color: #0b1d31 !important; overflow: hidden; align-items: end !important; place-items: end center !important; }
.avatar-svg { width: 82%; height: 82%; fill: #0b1d31; }

/* ---------- Профиль ---------- */
.role { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.role-user { background: rgba(46,168,255,.14); color: #8fd2ff; border: 1px solid rgba(46,168,255,.3); }
.role-seller { background: rgba(31,224,160,.13); color: var(--green); border: 1px solid rgba(31,224,160,.35); }
.role-admin { background: linear-gradient(135deg, rgba(255,199,90,.2), rgba(255,140,90,.2)); color: #ffd27a; border: 1px solid rgba(255,199,90,.45); }
.avatar-xl { width: 88px; height: 88px; border-radius: 26px; }
.profile-hero { display: flex; align-items: center; gap: 22px; padding: 28px; position: relative; overflow: hidden; }
.profile-hero::after { content: ''; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: var(--grad); filter: blur(80px); opacity: .25; pointer-events: none; }
.profile-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-name-row h1 { margin: 0; }
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 34px; }
.pstat { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.pstat > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pstat b { font-family: var(--font-h); font-size: 19px; word-break: break-all; }
.pstat-label { color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pstat-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--line-2); color: var(--cyan); flex: none; }
.pstat-balance { border-color: rgba(31,224,160,.35); background: linear-gradient(140deg, rgba(31,224,160,.1), var(--surface)); }
.pstat-balance .pstat-ic { background: var(--grad); color: #03202a; border: 0; }
.pstat-balance .btn { width: 100%; }
.mono { font-family: ui-monospace, Consolas, monospace !important; }
.profile-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.h3-title { font-size: 22px; margin-bottom: 16px; }
.stack-col { display: flex; flex-direction: column; gap: 16px; }
.stack-col h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.amount-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip-btn { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); cursor: pointer; font-weight: 700; font-size: 13.5px; }
.chip-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.blog-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.blog-row:last-child { border-bottom: 0; }
.blog-row > div, .blog-row > span { display: flex; flex-direction: column; }
.blog-row small { font-size: 12px; }
.plus { color: var(--green); white-space: nowrap; } .minus { color: var(--bad); white-space: nowrap; }

/* ---------- Оплата ---------- */
.pay-radios, .pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-radio, .pay-opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; width: 100%; text-align: left;
  border: 1px solid var(--line-2); background: rgba(0,0,0,.2); cursor: pointer; transition: .2s;
}
.pay-radio:hover, .pay-opt:hover:not(:disabled) { border-color: var(--cyan); }
.pay-radio:has(input:checked) { border-color: var(--green); background: rgba(31,224,160,.08); box-shadow: 0 0 0 3px rgba(31,224,160,.12); }
.pay-radio input { accent-color: var(--green); width: 17px; height: 17px; flex: none; }
.pay-radio.disabled, .pay-opt:disabled { opacity: .5; cursor: not-allowed; }
.pay-radio > span:last-child, .pay-opt > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.pay-radio small, .pay-opt small { color: var(--muted); font-size: 12.5px; }
.pay-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--line-2); color: var(--cyan); flex: none; font-weight: 800; }
.pay-ic.crypto { background: linear-gradient(135deg, #2aabee, #1fe0a0); color: #03202a; border: 0; font-size: 19px; }
.paybox { margin: 0 0 22px; padding: 20px; border-radius: 18px; border: 1px solid rgba(255,199,90,.3); background: rgba(255,199,90,.05); }
.paybox h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.codebox { border-color: rgba(51,214,255,.4); background: rgba(51,214,255,.06); }
.code-form { display: flex; gap: 10px; }
.code-form input { flex: 1; font-size: 20px; letter-spacing: .3em; text-align: center; font-weight: 800; }

@media (max-width: 1080px) { .pstats { grid-template-columns: repeat(2, 1fr); } .profile-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .pstats { grid-template-columns: 1fr; } .profile-hero { padding: 20px; gap: 14px; } .avatar-xl { width: 64px; height: 64px; } }

/* ---------- Таймер и чат ---------- */
.timer { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 22px; border-radius: 16px; border: 1px solid rgba(51,214,255,.35); background: linear-gradient(130deg, rgba(46,168,255,.12), rgba(31,224,160,.08)); }
.timer > div { display: flex; flex-direction: column; }
.timer-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: #03202a; flex: none; }
.timer-label { color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.timer-value, .timer [data-timer-value] { font-family: var(--font-h); font-size: 26px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.timer.soon { border-color: rgba(255,199,90,.5); background: rgba(255,199,90,.08); }
.timer.soon .timer-ic { background: var(--warn); }
.timer.expired { border-color: rgba(255,107,129,.5); background: rgba(255,107,129,.08); }
.timer.expired .timer-ic { background: var(--bad); }
.timer.expired [data-timer-value] { font-size: 17px; color: #ffb3bf; }
.chat-card { margin-top: 20px; padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat-head > div { display: flex; flex-direction: column; }
.chat-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--line-2); color: var(--cyan); }
.chat-body { height: 340px; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: rgba(0,0,0,.15); }
.chat-empty { margin: auto; color: var(--muted); font-size: 14px; text-align: center; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.bubble { max-width: 78%; padding: 9px 13px 7px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.msg.mine .bubble { background: linear-gradient(135deg, rgba(46,168,255,.35), rgba(31,224,160,.3)); border-color: rgba(51,214,255,.35); border-bottom-right-radius: 5px; }
.msg.theirs .bubble { border-bottom-left-radius: 5px; }
.msg-who { font-size: 11.5px; font-weight: 800; color: var(--cyan); text-transform: uppercase; letter-spacing: .04em; }
.msg-text { white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.msg-time { align-self: flex-end; font-size: 11px; color: var(--muted); margin-top: 2px; }
.chat-form { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; min-height: 46px; max-height: 140px; }

/* ---------- Отзыв ---------- */
.review-card { margin-top: 20px; border-color: rgba(255,199,90,.35); background: linear-gradient(140deg, rgba(255,199,90,.07), var(--surface)); }
.review-card h3 { display: flex; align-items: center; gap: 8px; }
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 14px; }
.stars-input input { display: none; }
.stars-input label { font-size: 34px; line-height: 1; color: rgba(255,255,255,.18); cursor: pointer; transition: color .15s, transform .15s; }
.stars-input label:hover, .stars-input label:hover ~ label, .stars-input input:checked ~ label { color: #ffc75a; }
.stars-input label:hover { transform: scale(1.15); }
.stars-static { color: #ffc75a; letter-spacing: 2px; font-size: 18px; }
.stars-static span { color: rgba(255,255,255,.18); }
.file-pick { display: flex; align-items: center; gap: 9px; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--text-2); cursor: pointer; position: relative; font-size: 14.5px; }
.file-pick:hover { border-color: var(--cyan); color: var(--text); }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.review-done { display: flex; gap: 14px; }
.review-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: #03202a; flex: none; }
.review-img { max-width: 280px; max-height: 280px; border-radius: 12px; margin-top: 10px; border: 1px solid var(--line-2); object-fit: cover; }

/* ---------- Чаты ---------- */
.chats-section { padding-top: 32px; }
.chats-layout { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.chats-list { padding: 0 !important; max-height: calc(100vh - 140px); overflow-y: auto; position: sticky; top: calc(var(--header-h) + 16px); }
.chats-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.chats-list-head h1 { margin: 0; font-size: 20px; }
.chats-empty { padding: 16px; }
.chat-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text); position: relative; }
.chat-item:hover { background: rgba(255,255,255,.03); color: var(--text); }
.chat-item.active { background: rgba(24,226,154,.08); box-shadow: inset 3px 0 0 var(--green); }
.chat-item-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: rgba(31,107,255,.2); color: var(--cyan); }
.chat-item-ic.tkt { background: rgba(255,210,63,.16); color: #ffd23f; }
.chat-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-item-top { display: flex; justify-content: space-between; gap: 8px; }
.chat-item-sub { font-size: 13px; color: var(--cyan); }
.chat-item-last { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-unread { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; background: #ffd23f; color: #3a2a00; font-weight: 900; font-size: 12px; align-self: center; }
.chat-pane { padding: 20px !important; min-height: 560px; display: flex; flex-direction: column; }
.chat-back { display: none; margin-bottom: 10px; font-weight: 700; }
.chat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-top h2 { margin: 0 0 2px; font-size: 22px; }
.chat-top-right { display: flex; gap: 8px; align-items: center; }
.chat-top-right form { margin: 0; }
.chat-box { display: flex; flex-direction: column; flex: 1; border: 1px solid var(--line); background: rgba(0,0,0,.15); }
.chat-box .chat-body { flex: 1; min-height: 360px; height: 52vh; background: transparent; }
.chat-notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 14px; margin-bottom: 12px; font-weight: 700; font-size: 14.5px; }
.chat-notice.warn { background: rgba(255,199,90,.1); box-shadow: inset 0 0 0 1px rgba(255,199,90,.35); color: #ffe0a3; }
.chat-notice.info { background: rgba(63,224,255,.08); box-shadow: inset 0 0 0 1px rgba(63,224,255,.35); }
.chat-notice .btn { margin-left: auto; }
.msg.system { justify-content: center; }
.sys-bubble { max-width: 88%; padding: 10px 14px 6px; background: rgba(31,107,255,.12); border: 1px dashed rgba(63,224,255,.35); display: flex; flex-direction: column; font-size: 14px; color: var(--text-2); }
.msg-img { max-width: 240px; max-height: 240px; object-fit: cover; margin: 4px 0; border: 1px solid var(--line-2); }
.chat-closed { padding: 14px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.review-inline { padding: 14px 16px; border-top: 1px solid var(--line); background: rgba(255,210,63,.05); }
.review-inline h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 8px; }
.review-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.review-row .file-pick { margin: 0; flex: 1; min-width: 180px; }
.ticket-new, .chat-placeholder { max-width: 560px; }
.chat-placeholder { margin: auto; text-align: center; }
.ticket-ic { width: 60px; height: 60px; display: grid; place-items: center; background: var(--grad); color: #04261b; margin-bottom: 16px; }
.chat-placeholder .ticket-ic { margin: 0 auto 16px; }
.order-chat-btn { margin: -6px 0 22px; }
.chat-count { background: var(--cyan) !important; color: #04222c !important; }
@media (max-width: 900px) {
  .chats-layout { grid-template-columns: 1fr; }
  .chats-list { position: static; max-height: none; }
  .chats-layout.has-active .chats-list { display: none; }
  .chats-layout:not(.has-active) .chat-pane { display: none; }
  .chat-back { display: inline-block; }
  .chat-pane { min-height: 0; padding: 14px !important; }
  .chat-box .chat-body { height: 55vh; }
}

/* Вложения в чатах */
.attach-btn { position: relative; width: 46px; height: 46px; flex: none; display: grid; place-items: center; cursor: pointer; color: var(--cyan); background: rgba(31,107,255,.14); box-shadow: inset 0 0 0 1px var(--line-2); }
.attach-btn:hover { color: var(--text); background: rgba(31,107,255,.24); }
.attach-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.attach-preview { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 12px; padding: 8px 12px; font-size: 13.5px; background: rgba(63,224,255,.08); box-shadow: inset 0 0 0 1px rgba(63,224,255,.3); }
.attach-preview[hidden] { display: none; }
.attach-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-preview button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; }
.msg-file { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; padding: 8px 12px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); font-weight: 700; word-break: break-all; }
.msg-file:hover { color: var(--cyan); }
/* Лента сообщений по высоте экрана — поле ввода всегда видно */
.chat-box .chat-body { flex: none; height: calc(100vh - 420px); min-height: 280px; }
@media (max-width: 900px) { .chat-box .chat-body { height: calc(100vh - 330px); min-height: 260px; } }
