:root {
  --bg: #071426;
  --bg-2: #0b1d35;
  --card: rgba(14, 36, 62, .78);
  --card-hi: rgba(22, 52, 86, .9);
  --line: rgba(92, 190, 255, .16);
  --line-hi: rgba(92, 205, 255, .45);
  --text: #eaf6ff;
  --muted: #8eaecb;
  --accent: #3ecfff;
  --accent-2: #1a8fff;
  --ok: #3ee29a;
  --warn: #ffc15a;
  --danger: #ff6b7d;
  --glow: 0 0 18px rgba(62, 207, 255, .45);
  --radius: 18px;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 500 15px/1.45 var(--font); }
body { overflow-x: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }

/* фон «плата» как на логотипе */
.circuit {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% 25%, rgba(30, 110, 200, .28), transparent 60%),
    radial-gradient(700px 600px at 100% 100%, rgba(20, 90, 170, .25), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' fill='none' stroke='%235cc8ff' stroke-opacity='.10' stroke-width='1.2'%3E%3Cpath d='M0 40h60l20 20h60M140 60v50l20 20h80M30 240v-60l30-30h40M100 150h40l20-20M200 0v40l-20 20M240 180h-50l-20 20v40M0 120h30l15 15v35'/%3E%3Ccircle cx='140' cy='60' r='3'/%3E%3Ccircle cx='100' cy='150' r='3'/%3E%3Ccircle cx='180' cy='60' r='3'/%3E%3Ccircle cx='170' cy='200' r='3'/%3E%3Ccircle cx='45' cy='170' r='3'/%3E%3Ccircle cx='60' cy='40' r='3'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #081a31, var(--bg));
}

#app { max-width: 560px; margin: 0 auto; padding: 0 16px calc(110px + env(safe-area-inset-bottom)); min-height: 100vh; }
.screen { }
@keyframes in { from { opacity: 0; } to { opacity: 1; } }

.splash { min-height: 80vh; display: grid; place-items: center; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite; box-shadow: var(--glow); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- бренд ---------- */
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 0 6px; }
.brand svg { width: 58px; height: 58px; flex: none; }
.brand-name { font-weight: 800; font-size: 30px; letter-spacing: -.5px; line-height: 1; }
.brand-name b { color: var(--accent); font-weight: 800; text-shadow: 0 0 16px rgba(62, 207, 255, .6); }
.brand-name { text-shadow: 0 0 14px rgba(220, 240, 255, .25); }
.brand-sub { font-size: 11.5px; letter-spacing: 2.4px; text-transform: uppercase; color: #cfe6f7; margin-top: 6px; font-weight: 600; }

.hello { margin: 16px 0 18px; padding: 16px 18px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(26, 143, 255, .22), rgba(62, 207, 255, .08));
  border: 1px solid var(--line-hi); box-shadow: inset 0 0 24px rgba(62, 207, 255, .08); }
.hello h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.hello p { margin: 0; color: #cde3f5; font-size: 14px; }

/* ---------- плитки главной ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius);
  padding: 16px 14px 14px; min-height: 132px; display: flex; flex-direction: column; gap: 8px; cursor: pointer;
  transition: transform .12s, border-color .2s, box-shadow .2s; }
.tile:active { transform: scale(.97); }
.tile:hover { border-color: var(--line-hi); box-shadow: var(--glow); }
.tile .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(62, 207, 255, .1); border: 1px solid var(--line-hi); box-shadow: 0 0 14px rgba(62, 207, 255, .25); }
.tile .ico svg { width: 22px; height: 22px; stroke: var(--accent); filter: drop-shadow(0 0 4px rgba(62, 207, 255, .8)); }
.tile .t { font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.tile .s { font-size: 12px; color: var(--muted); line-height: 1.3; }
.tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; gap: 14px; }
.tile.wide .txt { display: flex; flex-direction: column; gap: 2px; }
.tile.accent { background: linear-gradient(135deg, rgba(26, 143, 255, .35), rgba(62, 207, 255, .15)); border-color: var(--line-hi); }
.tile .tag { position: absolute; top: 12px; right: 12px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.tag.ok, .badge.ok { background: rgba(62, 226, 154, .14); color: var(--ok); border: 1px solid rgba(62, 226, 154, .35); }
.tag.warn, .badge.warn { background: rgba(255, 193, 90, .12); color: var(--warn); border: 1px solid rgba(255, 193, 90, .35); }

.hello .more { margin-top: 10px; border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.slogan { text-align: center; font-weight: 800; font-size: 16px; margin: 18px 0 8px; color: var(--accent); text-shadow: 0 0 14px rgba(62, 207, 255, .45); }
.tile.hot { background: linear-gradient(135deg, rgba(26, 143, 255, .28), rgba(14, 36, 62, .85)); border-color: var(--line-hi); }
.promo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.promo-img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.promo-body { padding: 14px 16px 16px; }
.promo-title { font-weight: 800; font-size: 17px; line-height: 1.25; margin-bottom: 8px; }
.promo .desc { white-space: pre-wrap; color: #d4e7f6; margin-top: 10px; font-size: 14.5px; }
.rv-summary { display: flex; align-items: center; gap: 16px; }
.rv-avg { font-size: 42px; font-weight: 800; color: var(--accent); line-height: 1; }
.rv-stars { color: #ffc15a; letter-spacing: 2px; font-size: 16px; }
.rv-summary p { margin: 4px 0 0; }
.review .rv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.review .desc { white-space: pre-wrap; color: #d4e7f6; margin-top: 8px; font-size: 14.5px; }
.rv-photo { display: block; width: 100%; max-height: 280px; object-fit: cover; border-radius: 12px; margin-top: 10px; }
.rv-reply { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--accent); background: rgba(62, 207, 255, .07); border-radius: 0 10px 10px 0; font-size: 13.5px; color: #d4e7f6; }
.rv-reply b { display: block; color: var(--accent); font-size: 12.5px; margin-bottom: 2px; }
.rv-pick { display: flex; gap: 6px; }
.rv-pick button { flex: 1; font-size: 30px; line-height: 1; padding: 10px 0; border-radius: 12px; border: 1px solid var(--line); background: rgba(4, 14, 28, .5); color: #5f7f9c; cursor: pointer; }
.rv-pick button.on { color: #ffc15a; border-color: rgba(255, 193, 90, .5); }
.footer-note { text-align: center; color: var(--muted); font-size: 12px; margin: 22px 0 0; }

/* ---------- шапка экранов ---------- */
.top { display: flex; align-items: center; gap: 10px; padding: 18px 0 14px; position: sticky; top: 0; z-index: 4;
  background: linear-gradient(180deg, var(--bg) 70%, transparent); }
.back { width: 38px; height: 38px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; cursor: pointer; }
.back svg { width: 20px; height: 20px; stroke: var(--text); }
.top h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.lead { color: #cfe3f4; margin: 0 0 16px; font-size: 14.5px; }

/* ---------- карточки / формы ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; font-size: 13px; font-weight: 700; color: #cfe3f4; margin-bottom: 8px; }
.label i { color: var(--danger); font-style: normal; }
.input, .textarea, .select { width: 100%; background: rgba(4, 14, 28, .6); border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(62, 207, 255, .15); }
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #5f7f9c; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: rgba(4, 14, 28, .5); padding: 9px 13px; border-radius: 999px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; transition: all .15s; }
.chip.on { background: linear-gradient(135deg, var(--accent-2), var(--accent)); border-color: transparent; color: #03203a; box-shadow: var(--glow); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 15px; padding: 15px 16px;
  font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .12s, opacity .2s;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #03203a; box-shadow: 0 6px 22px rgba(30, 150, 255, .35); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line-hi); box-shadow: none; }
.btn.danger { background: rgba(255, 107, 125, .12); color: var(--danger); border: 1px solid rgba(255, 107, 125, .35); box-shadow: none; }
.btn svg { width: 19px; height: 19px; stroke: currentColor; }
.btn + .btn { margin-top: 10px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; margin-top: 0 !important; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(7, 20, 38, .92) 30%); }
.bar-in { max-width: 528px; margin: 0 auto; }

/* ---------- статус стёкол ---------- */
.status { display: flex; gap: 14px; align-items: center; }
.status .dot { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.status .dot svg { width: 24px; height: 24px; }
.status.ok .dot { background: rgba(62, 226, 154, .12); border: 1px solid rgba(62, 226, 154, .4); }
.status.ok .dot svg { stroke: var(--ok); }
.status.no .dot { background: rgba(255, 193, 90, .1); border: 1px solid rgba(255, 193, 90, .4); }
.status.no .dot svg { stroke: var(--warn); }
.status b { display: block; font-size: 16px; }
.status span { color: var(--muted); font-size: 13.5px; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #d4e7f6; }
.perks li::before { content: ""; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--accent); box-shadow: var(--glow); flex: none; }

/* ---------- каталог ---------- */
.seg { display: flex; background: rgba(4, 14, 28, .6); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 10px 0; border-radius: 10px; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--card-hi); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-hi); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: transform .12s, border-color .2s; }
.pcard:active { transform: scale(.97); }
.pcard .img { aspect-ratio: 1; background: rgba(4, 14, 28, .6) center / cover no-repeat; display: grid; place-items: center; }
.pcard .img svg { width: 46px; height: 46px; stroke: var(--line-hi); }
.pcard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .title { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.pcard .price { font-weight: 800; font-size: 16px; color: var(--accent); margin-top: auto; text-shadow: 0 0 10px rgba(62, 207, 255, .35); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; width: fit-content; }
.toggle-line { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--muted); font-size: 13.5px; }

.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); background: rgba(4, 14, 28, .6);
  border: 1px solid var(--line); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img, .gallery .ph { flex: none; width: 100%; aspect-ratio: 1; object-fit: contain; scroll-snap-align: center; }
.gallery .ph { display: grid; place-items: center; }
.gallery .ph svg { width: 90px; height: 90px; stroke: var(--line-hi); }
.dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-hi); transition: all .2s; }
.dots i.on { background: var(--accent); width: 18px; border-radius: 3px; box-shadow: var(--glow); }
.pdetail h2 { margin: 12px 0 6px; font-size: 21px; font-weight: 800; line-height: 1.25; }
.pdetail .price { font-size: 26px; font-weight: 800; color: var(--accent); margin: 10px 0; text-shadow: 0 0 14px rgba(62, 207, 255, .45); }
.pdetail .desc { white-space: pre-wrap; color: #d4e7f6; }
.muted { color: var(--muted); font-size: 13px; }

.empty { text-align: center; padding: 40px 12px; color: var(--muted); }
.empty svg { width: 54px; height: 54px; stroke: var(--line-hi); margin-bottom: 10px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

/* ---------- фото ---------- */
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photos .ph-item, .photos .ph-add { aspect-ratio: 1; border-radius: 12px; position: relative; overflow: hidden; }
.photos .ph-item img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph-item button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.photos .ph-add { border: 1.5px dashed var(--line-hi); display: grid; place-items: center; cursor: pointer; background: rgba(4, 14, 28, .4); }
.photos .ph-add svg { width: 24px; height: 24px; stroke: var(--accent); }
.photos input { display: none; }

/* ---------- успех ---------- */
.success { text-align: center; padding-top: 56px; }
.success .big { width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(62, 207, 255, .25), transparent 70%); border: 2px solid var(--accent); box-shadow: var(--glow), inset 0 0 20px rgba(62, 207, 255, .25); }
.success .big svg { width: 46px; height: 46px; stroke: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.success h1 { margin: 0 0 10px; font-size: 23px; font-weight: 800; }
.success p { color: #cfe3f4; margin: 0 auto 26px; max-width: 360px; }

/* ---------- админка ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 22px; font-weight: 800; color: var(--accent); text-shadow: 0 0 10px rgba(62, 207, 255, .4); }
.stat span { font-size: 11.5px; color: var(--muted); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 1px solid var(--line); background: var(--card); padding: 9px 14px; border-radius: 12px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.tabs button.on { color: var(--text); border-color: var(--line-hi); box-shadow: var(--glow); }
.list-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 15px; background: var(--card); border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; }
.list-item .thumb { width: 54px; height: 54px; border-radius: 11px; background: rgba(4, 14, 28, .6) center / cover; flex: none; display: grid; place-items: center; }
.list-item .thumb svg { width: 24px; height: 24px; stroke: var(--line-hi); }
.list-item .info { flex: 1; min-width: 0; }
.list-item .info b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .info span { font-size: 12.5px; color: var(--muted); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(4, 14, 28, .8); border: 1px solid var(--line); transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + span { background: rgba(62, 207, 255, .25); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--accent); box-shadow: var(--glow); }
.req { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.req-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.req-head b { font-size: 14.5px; }
.req-head span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.req .who { font-size: 13.5px; margin-bottom: 8px; }
.req dl { margin: 0 0 10px; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; }
.req dt { color: var(--muted); }
.req dd { margin: 0; word-break: break-word; }
.req .btn { padding: 10px; font-size: 13.5px; border-radius: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0;
  background: rgba(10, 30, 55, .96); border: 1px solid var(--line-hi); box-shadow: var(--glow); color: var(--text); padding: 11px 16px; border-radius: 14px;
  z-index: 50; transition: all .25s; max-width: 90%; text-align: center; font-size: 14px; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }
