:root {
  --bg: #f4f6fa; --panel: #ffffff; --panel2: #eef1f6; --line: #d9dfe8;
  --text: #121821; --muted: #5b6778; --blue: #1f6fe0; --blue2: #1a5fd1; --chip: #1a5fd1;
  --topbg: rgba(255,255,255,.92); --hover: rgba(0,0,0,.04); --shadow: rgba(20,30,50,.18);
  --hero: radial-gradient(ellipse at 70% 20%, rgba(31,111,224,.22), transparent 60%), linear-gradient(160deg, #ffffff, #e3ecfa);
  --leadbg: linear-gradient(135deg, #e3ecfa, #ffffff); color-scheme: light;
  --ok: #2ecc71; --warn: #f5a623; --bad: #ff5a5f; --r: 12px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0a0d12; --panel: #121821; --panel2: #18202c; --line: #243042;
  --text: #e8edf4; --muted: #8b98ab; --blue: #2f8cff; --blue2: #1a5fd1; --chip: #9cc6ff;
  --topbg: rgba(10,13,18,.92); --hover: rgba(255,255,255,.04); --shadow: rgba(0,0,0,.5);
  --hero: radial-gradient(ellipse at 70% 20%, rgba(47,140,255,.35), transparent 60%), linear-gradient(160deg, #141c28, #07090d);
  --leadbg: linear-gradient(135deg, #142338, #121821); color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0a0d12; --panel: #121821; --panel2: #18202c; --line: #243042;
  --text: #e8edf4; --muted: #8b98ab; --blue: #2f8cff; --blue2: #1a5fd1; --chip: #9cc6ff;
  --topbg: rgba(10,13,18,.92); --hover: rgba(255,255,255,.04); --shadow: rgba(0,0,0,.5);
  --hero: radial-gradient(ellipse at 70% 20%, rgba(47,140,255,.35), transparent 60%), linear-gradient(160deg, #141c28, #07090d);
  --leadbg: linear-gradient(135deg, #142338, #121821); color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Montserrat, system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--blue); text-decoration: none; }
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--topbg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { font-weight: 800; font-size: 22px; color: var(--text); letter-spacing: 2px; display: flex; flex-direction: column; line-height: 1; }
.logo span { color: var(--blue); font-size: 11px; letter-spacing: 6px; margin-top: 2px; }
nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
nav a, nav button { padding: 8px 12px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
nav a:hover, nav button:hover, nav a.active { background: var(--panel2); }
.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; border: 0; background: linear-gradient(135deg, var(--blue), var(--blue2)); color: #fff; font: 600 15px Montserrat, sans-serif; cursor: pointer; text-align: center; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--panel2); border: 1px solid var(--line); color: var(--text); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: var(--bad); }
.hero { position: relative; border-radius: 20px; overflow: hidden; padding: 56px 28px; background: var(--hero); border: 1px solid var(--line); margin-bottom: 32px; }
.hero h1 { font-size: clamp(32px, 7vw, 64px); font-weight: 800; letter-spacing: 3px; }
.hero h1 span { display: block; color: var(--blue); font-size: .45em; letter-spacing: .5em; }
.hero p { color: var(--muted); text-transform: uppercase; letter-spacing: 2px; font-size: 13px; margin-bottom: 24px; }
.hero .row { display: flex; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card h3 { font-size: 16px; text-transform: uppercase; }
.card .muted, .muted { color: var(--muted); font-size: 13px; }
.price { color: var(--blue); font-weight: 600; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; padding: 24px; border-radius: var(--r); background: linear-gradient(135deg, var(--blue2), #0d2f6b); color: #fff; }
.banner h2 { margin: 0; text-transform: uppercase; font-style: italic; }
.form { max-width: 420px; margin: 0 auto; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input, select, textarea { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
textarea { min-height: 70px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); cursor: pointer; margin: 0; color: var(--text); font-size: 14px; }
.check input { width: auto; margin-top: 3px; }
.check.on { border-color: var(--blue); }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); cursor: pointer; font: inherit; }
.slot.on { background: var(--blue); border-color: var(--blue); }
.steps { display: grid; gap: 18px; }
.summary { position: sticky; top: 80px; }
.two { display: grid; gap: 20px; grid-template-columns: 1fr 320px; align-items: start; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } .summary { position: static; } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.tabs button.on { background: var(--blue); border-color: var(--blue); }
.table { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
td select, td input { padding: 6px 8px; font-size: 13px; min-width: 110px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--panel2); }
.st-new { color: var(--warn); } .st-confirmed { color: var(--blue); } .st-in_progress { color: #b77cff; } .st-done { color: var(--ok); } .st-cancelled { color: var(--bad); }
.order { display: grid; gap: 4px; }
.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar label { margin: 0 0 4px; }
.toolbar > div { min-width: 140px; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 12px 18px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); opacity: 0; transition: .25s; pointer-events: none; z-index: 50; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; } #toast.err { border-color: var(--bad); }
.foot { border-top: 1px solid var(--line); padding: 20px 16px; color: var(--muted); font-size: 13px; text-align: center; display: grid; gap: 6px; }
.empty { color: var(--muted); padding: 20px 0; }
.err { color: var(--bad); font-size: 14px; margin-top: 8px; min-height: 1em; }
.hero .lead { max-width: 560px; margin: -8px 0 24px; font-size: 16px; }
section { margin-top: 40px; }
.hero { margin-bottom: 0; padding: 48px 28px 40px; }
.hero .tag { display: inline-block; padding: 6px 12px; border-radius: 99px; background: rgba(47,140,255,.15); color: var(--chip); font-size: 13px; margin-bottom: 18px; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 6px; }
.ticks li::before { content: '✓'; color: var(--blue); font-weight: 800; margin-right: 10px; }
.btn.big { padding: 15px 26px; font-size: 16px; }
.btn:hover { filter: brightness(1.12); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stats > div { background: var(--panel); padding: 18px; text-align: center; }
.stats b { display: block; font-size: 24px; color: var(--blue); }
.stats span { color: var(--muted); font-size: 13px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.adv .ico { font-size: 28px; margin-bottom: 8px; }
.svc { display: flex; flex-direction: column; transition: .2s; } .svc .btn { margin-top: auto; align-self: flex-start; }
.svc:hover, .adv:hover { border-color: var(--blue); transform: translateY(-2px); }
.calc .calc-res { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 18px; }
.steps4 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); font-weight: 800; margin-bottom: 10px; }
.faq { display: grid; gap: 10px; }
.faq summary { cursor: pointer; font-weight: 600; } .faq details[open] summary { margin-bottom: 8px; color: var(--blue); }
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; background: var(--leadbg); }
.lead-form form { display: grid; gap: 10px; } .small { font-size: 11px; }
@media (max-width: 700px) { .lead-form { grid-template-columns: 1fr; } }
.reveal { opacity: 0; transform: translateY(18px); transition: .6s ease; } .reveal.in { opacity: 1; transform: none; }
.fab { position: fixed; right: 16px; bottom: 20px; display: grid; gap: 10px; z-index: 40; }
.fab a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #fff; box-shadow: 0 6px 20px var(--shadow); }
.fab-tg { background: #229ed9; } .fab-tel { background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,204,113,.6); } 70% { box-shadow: 0 0 0 14px rgba(46,204,113,0); } 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); } }
.mobile-cta { display: none; }
@media (max-width: 700px) {
  .mobile-cta { display: block; position: fixed; left: 12px; right: 84px; bottom: 20px; z-index: 39; padding: 15px; box-shadow: 0 6px 20px var(--shadow); }
  .foot { padding-bottom: 90px; }
}
@media (max-width: 700px) {
  .top { flex-wrap: nowrap; padding: 10px 12px; }
  nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  nav a, nav button { padding: 6px 8px; font-size: 13px; white-space: nowrap; }
  .logo { font-size: 18px; }
  .hero { padding: 32px 18px; }
  .hero .row .btn { width: 100%; }
}
.plate { display: inline-block; padding: 0 6px; border: 1px solid var(--muted); border-radius: 4px; font-weight: 600; letter-spacing: 1px; font-size: 13px; }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; }
.kpi span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.kpi b { font-size: 24px; } .kpi em { font-style: normal; color: var(--muted); font-size: 12px; }
.charts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.cc { position: relative; height: 200px; margin: 16px 0 0 56px; }
.cc-grid > div { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.cc-grid span { position: absolute; left: -56px; top: -8px; width: 50px; white-space: nowrap; text-align: right; font-size: 11px; color: var(--muted); }
.cc-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.cc-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.cc-col:hover { background: var(--hover); }
.cc-bar { width: 100%; max-width: 24px; background: var(--blue); border-radius: 4px 4px 0 0; min-height: 0; }
.cc-x { position: absolute; top: 100%; left: 0; right: 0; display: flex; gap: 2px; margin-top: 4px; }
.cc-x span { flex: 1; font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; }
.charts .card { padding-bottom: 34px; }
.bl { display: grid; gap: 8px; margin-top: 12px; }
.bl-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.bl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-track { height: 12px; } .bl-bar { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; }
.bl-val { color: var(--muted); min-width: 24px; text-align: right; }
#ctip { position: fixed; display: none; pointer-events: none; z-index: 60; background: var(--panel); color: var(--text); box-shadow: 0 4px 14px var(--shadow); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; font-size: 13px; white-space: nowrap; }

/* --- тема --- */
body { transition: background .2s, color .2s; }
.theme-btn { width: 38px; height: 38px; padding: 0 !important; border-radius: 50% !important; font-size: 17px !important; border: 1px solid var(--line) !important; flex: none; }
.banner .btn.ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }

/* --- админка: боковое меню --- */
.admin { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.side { position: sticky; top: 80px; display: grid; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; }
.side a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 14px; }
.side a:hover { background: var(--panel2); }
.side a.on { background: var(--blue); color: #fff; }
.side .badge-n { margin-left: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }
.admin-main { min-width: 0; }
@media (max-width: 800px) {
  .admin { grid-template-columns: 1fr; gap: 14px; }
  .side { position: static; display: flex; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .side a { white-space: nowrap; padding: 8px 10px; }
}

/* --- «Заказать звонок?» --- */
.fab-tel { position: relative; }
.call-bubble { position: fixed; right: 82px; bottom: 26px; z-index: 41; background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: 0 6px 20px var(--shadow);
  padding: 10px 14px; border-radius: 12px 12px 2px 12px; font-weight: 600; font-size: 14px; cursor: pointer; opacity: 0; transform: translateX(10px); pointer-events: none; transition: .35s; }
.call-bubble.show { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 700px) { .call-bubble { bottom: 84px; right: 16px; border-radius: 12px 12px 2px 12px; } }

/* --- галерея до/после --- */
.ba { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--panel2); user-select: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba .ba-before { clip-path: inset(0 50% 0 0); }
.ba .ba-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.6); pointer-events: none; }
.ba .ba-line::after { content: '⇆'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-size: 16px; }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba .ba-tag { position: absolute; top: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; pointer-events: none; }
.work h3 { margin: 10px 0 0; font-size: 14px; }
/* --- отзывы --- */
.stars { color: #f5a623; letter-spacing: 2px; }
.review { display: grid; gap: 8px; }
.review .who { font-weight: 600; }
.rate-pick { display: flex; gap: 4px; font-size: 26px; }
.rate-pick button { background: none; border: 0; cursor: pointer; color: var(--line); font-size: inherit; padding: 0; }
.rate-pick button.on { color: #f5a623; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; } .thumbs img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
body.wide main { max-width: 1440px; }
section, [id] { scroll-margin-top: 80px; }
.ava { border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; vertical-align: middle; flex: none; }
.ava-empty { background: var(--blue); color: #fff; font-weight: 800; }
nav a .ava { margin-right: 4px; }
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ava-up { position: relative; cursor: pointer; margin: 0; }
.ava-up > span:last-of-type { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 15px; }
.two > div > .card + .card, #tg-box .card { margin-top: 16px; }
.garage .card h3 { margin-bottom: 6px; }
