:root {
  /* Цвета логотипа rem AI: голубой → синий → фиолетовый */
  --c1: #00a5fb; --c3: #7c3aed;
  --grad: linear-gradient(135deg, var(--c1) 0%, var(--accent) 50%, var(--c3) 100%);
  --bg: #f5f7fb; --surface: #fff; --ink: #0f172a; --muted: #64748b; --line: #e2e7f0;
  --dark: #0b1020; --dark-2: #121a33; --dark-line: #1f2a4d; --ok: #1f9d55; --err: #c0392b; --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(37,99,235,.07);
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 Manrope, system-ui, sans-serif; background: var(--bg); color: var(--ink); }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 460px; } .narrow-wide { max-width: 820px; }
.muted { color: var(--muted); } .center { text-align: center; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11,16,32,.92); border-bottom: 1px solid var(--dark-line); color: #fff; backdrop-filter: blur(8px); }
.top__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; text-decoration: none; letter-spacing: -.01em; }
.logo__img { width: 40px; height: 40px; display: block; }
.logo small { font-weight: 500; font-size: 12px; color: #9aa0a8; margin-left: 6px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; color: #c9cdd3; font-weight: 600; font-size: 14px; }
.nav a:hover { color: #fff; } .nav a { transition: color .15s; }
.top__right { display: flex; align-items: center; gap: 14px; }
.phone { font-weight: 700; text-decoration: none; white-space: nowrap; }
.link { color: var(--muted); font-size: 14px; }
.top .link { color: #9aa0a8; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font: 700 15px/1 Manrope, sans-serif; padding: 13px 20px; border-radius: 10px;
  text-decoration: none; transition: transform .1s, filter .15s, box-shadow .15s; box-shadow: 0 6px 18px rgba(47,107,255,.28); }
.btn:hover { filter: brightness(1.08); box-shadow: 0 8px 24px rgba(124,58,237,.32); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn--sm { padding: 9px 14px; font-size: 14px; }
.btn--lg { padding: 17px 26px; font-size: 16px; }
.btn--block { width: 100%; margin-top: 10px; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.hero .btn--ghost:hover, .section--dark .btn--ghost:hover { color: #7cc8ff; box-shadow: inset 0 0 0 1.5px #7cc8ff; }

/* hero */
.hero { position: relative; overflow: hidden; color: #fff; padding: 72px 0 84px;
  background: radial-gradient(900px 480px at 88% -5%, rgba(124,58,237,.35), transparent 60%),
              radial-gradient(800px 420px at 5% 110%, rgba(0,165,251,.28), transparent 60%), var(--dark); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(124,160,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(124,160,255,.07) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%); }
.hero__in { position: relative; }
.hero__in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: #5cc4ff; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.08; margin: 10px 0 18px; letter-spacing: -.02em; }
.lead { font-size: 19px; color: #c9cdd3; max-width: 620px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }
.hero__facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hero__facts li { border-left: 3px solid; border-image: var(--grad) 1; padding-left: 12px; color: #9aa0a8; font-size: 14px; }
.hero__facts b { display: block; color: #fff; font-size: 15px; }
.offer { position: relative; background: var(--surface); color: var(--ink); border-radius: 18px; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(124,58,237,.25); }
.offer__logo { width: 64px; height: 64px; display: block; }
.offer h2 { margin: 6px 0 8px; font-size: 24px; line-height: 1.2; }
.offer__badge { position: absolute; top: -12px; right: 20px; background: var(--grad); color: #fff; font-weight: 800; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.offer__steps { padding-left: 20px; color: var(--muted); }
.offer .btn--ghost { color: var(--ink); }

/* sections */
.section { padding: 72px 0; }
.section-sm { margin-top: 24px; }
.section--dark { background: radial-gradient(700px 360px at 100% 0, rgba(124,58,237,.22), transparent 60%), var(--dark); color: #fff; }
.section--dark .sub { color: #9aa0a8; }
.section--alt { background: #eef2fb; }
.h2 { font-size: clamp(26px, 3vw, 38px); margin: 0 0 8px; letter-spacing: -.01em; line-height: 1.15; }
.h3 { font-size: 20px; margin: 0 0 14px; }
.sub { color: var(--muted); font-size: 17px; margin: 0 0 32px; max-width: 720px; }
.grid { display: grid; gap: 20px; }
.grid--services { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.grid--exp { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid--smart { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid--steps { grid-template-columns: repeat(4, 1fr); margin-bottom: 32px; }
.grid--projects { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--kpi { grid-template-columns: repeat(4, 1fr); margin-bottom: 28px; gap: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 0; }
.card h3 { margin: 10px 0 8px; font-size: 19px; }
.card p { margin: 0 0 12px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 22px; position: relative; margin: 5px 0; font-size: 14.5px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.card__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; font-size: 26px;
  background: linear-gradient(135deg, rgba(0,165,251,.12), rgba(124,58,237,.14)); }
.grid--services .card { transition: transform .15s, box-shadow .15s; }
.grid--services .card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(47,107,255,.14); }
.cols2 { columns: 2; }

.exp { background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius); padding: 22px; }
.exp__kind { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #5cc4ff; font-weight: 700; }
.exp h3 { margin: 6px 0 8px; font-size: 21px; }
.exp p { color: #b8bdc4; font-size: 14.5px; margin: 0; }

.smart { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.feat span { font-size: 22px; } .feat b { display: block; margin: 4px 0; } .feat p { margin: 0; color: var(--muted); font-size: 14px; }
.phone-mock { justify-self: center; width: 290px; padding: 12px; border-radius: 40px; background: #05070f; outline: 1px solid var(--dark-line); box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.phone-mock__screen { background: var(--dark-2); color: #fff; border-radius: 30px; padding: 26px 18px; min-height: 520px; }
.pm-title { font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.pm-title img { width: 26px; height: 26px; }
.pm-row { display: flex; justify-content: space-between; align-items: center; background: #1a2444; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; font-size: 14px; }
.sw { width: 40px; height: 22px; border-radius: 99px; background: #444a55; position: relative; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.sw.on { background: var(--grad); } .sw.on::after { left: 21px; }
.pm-scn { margin: 14px 0; font-size: 13px; } .pm-scn b { display: block; margin-bottom: 6px; }
.chip { display: inline-block; padding: 5px 10px; border-radius: 99px; background: #1a2444; margin: 0 4px 4px 0; }
.chip.on { background: var(--grad); color: #fff; font-weight: 700; }
.pm-energy { background: #1a2444; border-radius: 12px; padding: 14px; font-size: 13px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 70px; margin: 10px 0; }
.bars i { flex: 1; background: linear-gradient(to top, var(--c3), var(--c1)); border-radius: 3px 3px 0 0; opacity: .85; }
.pm-energy small { color: #9aa0a8; }

.step span { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; }
.step b { display: block; margin: 12px 0 4px; font-size: 17px; } .step p { margin: 0; color: var(--muted); }

.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.big { font-size: 22px; font-weight: 700; } .big a { text-decoration: none; }

/* forms */
.form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.form.row label { margin: 0; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; font: inherit; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,107,255,.15); }
input[type=checkbox] { display: inline; width: auto; margin: 0 6px 0 0; accent-color: var(--accent); }
input[type=color] { height: 46px; padding: 4px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
legend { font-weight: 800; padding: 0 6px; }
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; }
.check { font-weight: 500 !important; margin: 4px 0 !important; display: flex !important; align-items: center; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols--3 { grid-template-columns: repeat(3, 1fr); }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; }
.drop:hover { border-color: var(--accent); }
.drop b, .drop span { display: block; } .drop span { color: var(--muted); font-weight: 500; font-size: 13px; }

/* flashes, badges */
.flashes { margin-top: 16px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; font-weight: 600; }
.flash--ok { background: #e3f6ea; color: #155d33; } .flash--error { background: #fdeaea; color: #8e2a1f; }
.badge { display: inline-block; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; background: #eceae4; }
.badge--ready { background: #e3f6ea; color: #155d33; } .badge--calculating { background: #fff4d6; color: #7a5600; }
.badge--error { background: #fdeaea; color: #8e2a1f; } .badge--in_work { background: #e3edfb; color: #1d4b8f; }
.badge--done { background: var(--dark); color: #fff; }

/* cabinet / project */
.proj { text-decoration: none; display: block; transition: transform .15s; } .proj:hover { transform: translateY(-2px); }
.proj__price { font-size: 22px; font-weight: 800; margin: 8px 0; } .proj__price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.empty { text-align: center; padding: 48px; }
.calc { margin-bottom: 24px; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.calc { display: block; }
.calc__head { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.calc__head h3 { margin: 0; }
.calc__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
.steps { list-style: none; padding: 0; margin: 18px 0 10px; }
.steps li { position: relative; padding: 0 0 16px 40px; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: 6px; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line); background: #fff; box-sizing: border-box; }
.steps li::after { content: ""; position: absolute; left: 15px; top: 24px; bottom: 2px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li > b { display: block; color: inherit; font-size: 15px; }
.steps li span { display: block; font-size: 13.5px; }
.steps li em { display: block; font-style: normal; animation: fadein .4s; }
.steps li.done { color: var(--ink); }
.eta { font-style: normal; font-weight: 600; font-size: 13px; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.steps li.now .eta { color: var(--accent); }
.steps li.done::before { content: "✓"; background: var(--grad); border: 0; color: #fff; font: 800 12px/20px Manrope, sans-serif; text-align: center; }
.steps li.done::after { background: var(--accent); }
.steps li.now { color: var(--ink); }
.steps li.now::before { border-color: var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
@keyframes fadein { from { opacity: 0; transform: translateY(-3px); } }
.timer { margin: 4px 0 0; font-size: 15px; }
.countdown { font-size: 22px; font-variant-numeric: tabular-nums; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 3%; background: var(--grad); border-radius: 99px; transition: width 1s linear; }
.proj-grid { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.proj-main, .proj-side { display: grid; gap: 24px; min-width: 0; }
.proj-side { position: sticky; top: 88px; }
.plan-img { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.price small { color: var(--muted); }
.price__val { font-size: 34px; font-weight: 800; margin: 4px 0 8px; letter-spacing: -.01em; }
.cat { margin: 18px 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl tfoot th { color: var(--ink); font-size: 14.5px; }
.tbl--hover tbody tr { cursor: pointer; } .tbl--hover tbody tr:hover { background: #f3f6fd; }
.files { padding-left: 0; list-style: none; } .files li { margin: 4px 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.kpi small { color: var(--muted); display: block; } .kpi b { font-size: 22px; }
.kpi--accent { background: var(--grad); border-color: transparent; color: #fff; } .kpi--accent small { color: rgba(255,255,255,.8); }

/* chat */
.chat { display: flex; flex-direction: column; }
.chat__head img { width: 32px; height: 32px; align-self: center; }
.chat__head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chat__head b { display: block; line-height: 1.2; }
.chat__head small { color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.chat__head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.chat__x { margin-left: auto; border: 0; background: #eef2fb; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--ink); line-height: 1; }
.chat__log { flex: 1; overflow-y: auto; padding: 14px 2px; display: flex; flex-direction: column; gap: 8px; max-height: 420px; scroll-behavior: smooth; }
.chat__log--static { max-height: 360px; }
.msg { padding: 10px 14px; border-radius: 16px; max-width: 86%; white-space: pre-wrap; font-size: 14.5px; line-height: 1.45; word-wrap: break-word; animation: fadein .25s; }
.msg--user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.msg--assistant { align-self: flex-start; background: #eef2fb; border-bottom-left-radius: 5px; }
.msg img { display: block; max-width: 180px; border-radius: 10px; margin-top: 6px; }
.msg--typing { display: inline-flex; gap: 5px; align-items: center; padding: 13px 16px; }
.msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: #8a97b5; animation: dot 1.2s infinite; }
.msg--typing i:nth-child(2) { animation-delay: .15s; } .msg--typing i:nth-child(3) { animation-delay: .3s; }
.msg--typing small { margin-left: 6px; color: var(--muted); font-size: 12.5px; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat__hints { display: flex; flex-wrap: wrap; gap: 6px; }
.chat__hints button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 12px; font: 600 13px Manrope, sans-serif; color: var(--accent); cursor: pointer; text-align: left; }
.chat__hints button:hover { border-color: var(--accent); }
.composer { border: 1.5px solid var(--line); border-radius: 16px; background: #fff; padding: 6px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.composer.drag { border-color: var(--accent); background: #f3f6ff; }
.composer__row { display: flex; align-items: flex-end; gap: 6px; }
.composer textarea { flex: 1; border: 0; margin: 0; padding: 9px 4px; resize: none; max-height: 140px; min-height: 40px; font-size: 15px; line-height: 1.4; box-shadow: none !important; background: transparent; }
.composer textarea:focus { outline: none; }
.composer__clip, .composer__send { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; border: 0; }
.composer__clip { color: var(--muted); background: #f1f4fa; } .composer__clip:hover { color: var(--accent); background: #e8eefc; }
.composer__send { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(47,107,255,.3); }
.composer__send:disabled { opacity: .45; box-shadow: none; cursor: default; }
.composer__file { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 4px; background: #f3f6fd; border-radius: 10px; font-size: 13px; }
.composer__file[hidden] { display: none; }
.composer__file img { width: 38px; height: 38px; object-fit: cover; border-radius: 7px; }
.composer__file span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer__rm { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px; }
.chat--inline .composer { margin-top: 4px; }
.chat--float { position: fixed; right: 20px; bottom: 20px; width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 100px);
  background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); z-index: 40; }
.chat--float[hidden] { display: none; }
.chat--float .chat__log { max-height: none; }
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 30; border: 0; cursor: pointer; background: var(--grad); color: #fff;
  font: 700 15px Manrope, sans-serif; padding: 14px 18px; border-radius: 99px; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; gap: 8px; align-items: center; }
.chat-fab[hidden] { display: none; }

.foot { border-top: 1px solid var(--dark-line); background: var(--dark); color: #b8bdc4; padding: 36px 0; font-size: 14px; }
.foot__in { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 24px; }
.foot__logo { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 6px; } .foot__logo img { width: 36px; height: 36px; }
.foot b { color: #fff; } .foot a { text-decoration: none; }

@media (max-width: 960px) {
  .nav { display: none; }
  .hero__in, .smart, .contacts, .proj-grid { grid-template-columns: 1fr; }
  .grid--steps, .grid--kpi { grid-template-columns: repeat(2, 1fr); }
  .proj-side { position: static; }
}
@media (max-width: 620px) {
  .top__in { gap: 10px; } .logo small, .phone { display: none; }
  .hero { padding: 44px 0 56px; }
  .hero__facts, .grid--smart, .cols, .cols--3, .checks, .grid--steps, .foot__in { grid-template-columns: 1fr; }
  .grid--kpi { grid-template-columns: 1fr 1fr; }
  .cols2 { columns: 1; }
  .section { padding: 48px 0; }
  .chat-fab span { display: none; }
  .chat--float { inset: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; padding: 14px 14px max(14px, env(safe-area-inset-bottom)); }
}

.auth-logo { width: 72px; height: 72px; display: block; margin: 0 auto 8px; }
.drop:hover { background: #f6f8ff; }
.imp { background: #fff4d6; color: #5c4300; text-align: center; padding: 10px 16px; font-size: 14px; }
.imp a { font-weight: 700; }

/* ---------- кабинет владельца ---------- */
.adm { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 68px); }
.adm__side { background: var(--dark); color: #c9d2e3; padding: 22px 14px; border-right: 1px solid var(--dark-line); }
.adm__me { padding: 0 10px 16px; border-bottom: 1px solid var(--dark-line); margin-bottom: 10px; }
.adm__me b { display: block; color: #fff; } .adm__me small { color: #7f8bab; }
.adm__nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; }
.adm__nav a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 14.5px; }
.adm__nav a:hover { background: #151f3d; color: #fff; }
.adm__nav a.on { background: linear-gradient(135deg, rgba(0,165,251,.22), rgba(124,58,237,.25)); color: #fff; }
.adm__nav a i { margin-left: auto; font-style: normal; font-size: 12px; background: var(--grad); color: #fff; padding: 1px 8px; border-radius: 99px; }
.adm__nav a i.warn { background: #f59e0b; }
.adm__group { margin: 14px 10px 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: #5d6a8c; }
.adm__main { padding: 28px 32px 60px; min-width: 0; }
.adm__main .h2 { font-size: 28px; }
.adm__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.adm__head .sub { margin: 4px 0 0; font-size: 15px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input, .filters select { width: auto; margin: 0; min-width: 160px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips a { padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.chips a.on { background: var(--grad); color: #fff; border-color: transparent; }
.chips a small { opacity: .7; margin-left: 4px; }
.tbl .actions { white-space: nowrap; text-align: right; }
.tbl .actions form { display: inline; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select, .inline-form textarea { width: auto; margin: 0; }
.danger { color: var(--err) !important; box-shadow: inset 0 0 0 1.5px var(--err) !important; }
.danger:hover { background: #fdeaea; }
.btn--link { background: none; box-shadow: none; color: var(--accent); padding: 4px 6px; }
.btn--link:hover { box-shadow: none; text-decoration: underline; filter: none; }
.grid--kpi6 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.kpi small + b { display: block; margin-top: 2px; }
.kpi .hint { font-size: 12px; color: var(--muted); }
.statusbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.statusbar a { flex: 1; min-width: 120px; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.statusbar a b { font-size: 22px; display: block; }
.statusbar a span { font-size: 13px; color: var(--muted); }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cards-edit { display: grid; gap: 14px; }
.card-edit { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fbfcff; }
.card-edit__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 10px; }
.card-edit__head input[type=number] { width: 80px; margin: 0; }
.set-section { margin-bottom: 20px; }
.secret-note { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.logo-preview { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-preview div { width: 120px; height: 120px; border-radius: 16px; display: grid; place-items: center; border: 1px solid var(--line); }
.logo-preview div img { width: 90px; height: 90px; }
.logo-preview .dark { background: var(--dark); }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .adm__side { padding: 10px; } .adm__me { display: none; }
  .adm__nav { flex-direction: row; overflow-x: auto; position: static; gap: 4px; }
  .adm__nav a { white-space: nowrap; } .adm__group { display: none; }
  .adm__main { padding: 20px 16px 50px; }
  .cols-2 { grid-template-columns: 1fr; }
}

/* ---------- выполненные объекты ---------- */
.grid--works { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.work-card { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.work-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(47,107,255,.16); }
.work-card__img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, rgba(0,165,251,.12), rgba(124,58,237,.14)); display: grid; place-items: center; }
.work-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-card__img span { font-size: 44px; }
.work-card__img i { position: absolute; right: 10px; bottom: 10px; font-style: normal; font-size: 12px; background: rgba(11,16,32,.75); color: #fff; padding: 3px 8px; border-radius: 99px; }
.work-card__body { padding: 14px 16px 16px; }
.work-card__body small { color: var(--accent); font-weight: 700; font-size: 12.5px; }
.work-card__body h3 { margin: 4px 0 4px; font-size: 18px; }
.eyebrow--dark { color: var(--accent); margin: 0; }
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.work-facts { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.work-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.work-facts dt { font-size: 12px; color: var(--muted); } .work-facts dd { margin: 0; font-weight: 800; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; gap: 10px; margin-bottom: 28px; }
.gallery a { position: relative; border-radius: 12px; overflow: hidden; display: block; background: #e8edf7; }
.gallery a img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery a span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.gallery__main { grid-column: span 2; grid-row: span 2; }
.work-text { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; margin-bottom: 28px; font-size: 16.5px; }
.offer-inline { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(0,165,251,.08), rgba(124,58,237,.10)); }
.offer-inline h3 { margin: 0 0 4px; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5,8,18,.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 8px; display: block; margin: 0 auto; }
.lightbox figcaption { color: #c9d2e3; margin-top: 10px; font-size: 15px; }
.lightbox__x { position: absolute; top: 14px; right: 20px; font-size: 40px; color: #fff; background: none; border: 0; cursor: pointer; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 54px; color: #fff; background: rgba(255,255,255,.08); border: 0; width: 56px; height: 80px; border-radius: 12px; cursor: pointer; }
.lightbox__prev { left: 14px; } .lightbox__next { right: 14px; }
/* кабинет: фото объекта */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ph { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.ph.cover { outline: 3px solid var(--accent); }
.ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.ph div { padding: 8px; display: grid; gap: 6px; font-size: 13px; }
.ph input[type=text], .ph input[type=number] { margin: 0; padding: 7px 9px; font-size: 13px; }
.ph label { margin: 0 !important; font-weight: 500 !important; font-size: 13px !important; display: flex !important; gap: 6px; align-items: center; }
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .work-text { grid-template-columns: 1fr; }
}

/* ---------- защита расчёта от копирования ---------- */
.protected { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.protected img { pointer-events: none; -webkit-user-drag: none; }
.wm__layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; background-repeat: repeat; }
.plan-wrap { position: relative; }
.wm__layer--dense { background-size: 300px 150px; opacity: .9; }
.protected.is-hidden > * { filter: blur(18px); transition: filter .1s; }
.protected.is-hidden::after { content: "🔒 Содержимое скрыто — вернитесь на страницу"; position: absolute; top: 120px; left: 50%; transform: translateX(-50%);
  z-index: 10; background: var(--dark); color: #fff; padding: 14px 22px; border-radius: 12px; font-weight: 700; white-space: nowrap; }
.queue .spinner { border-top-color: #f59e0b; }
@media print {
  body.protected-page > * { display: none !important; }
  body.protected-page::before { content: "Печать и сохранение расчёта запрещены. Свяжитесь с компанией, чтобы получить коммерческое предложение."; display: block; padding: 40px; font: 700 18px sans-serif; }
}
.badge--awaiting { background: #fff1db; color: #8a4b00; }

/* ---------- 3D-проект ---------- */
.scene-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.scene3d { height: min(72vh, 680px); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #e9edf5; }
.scene3d canvas { display: block; }
.scene-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.scene-bar .check { margin: 0 !important; }
.scene-side { display: grid; gap: 14px; }
.scene-side h3 { margin: 0 0 10px; }
.palette { display: flex; gap: 6px; margin-bottom: 10px; }
.palette i { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); }
.sw-c { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }
.refs { padding-left: 18px; margin: 0; } .refs li { margin-bottom: 8px; }
@media (max-width: 1100px) { .scene-wrap { grid-template-columns: 1fr; } }
@media (max-width: 620px) { body.chat-open { overflow: hidden; } }

.alive { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 10px; padding: 10px 14px;
  border-radius: 12px; background: #e7f8ee; color: #135c33; font-size: 14px; font-weight: 600; animation: fadein .3s; transition: opacity .3s; }
.alive b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-variant-numeric: tabular-nums; }
.alive--warn { background: #fff4d6; color: #6b4a00; }
.alive--out { opacity: 0; }
input[hidden], .composer__clip input { display: none !important; }
@media (max-width: 620px) { .composer textarea { font-size: 16px; } }   /* 16px — iPhone не приближает страницу при вводе */
/* телефон: колонки не шире экрана (иначе таблицы и длинные слова растягивают страницу вбок) */
@media (max-width: 960px) {
  .proj-grid, .scene-wrap, .work-text, .hero__in, .smart, .contacts { grid-template-columns: minmax(0, 1fr); }
}
.proj-main > *, .proj-side > * { min-width: 0; }
.card { overflow-wrap: anywhere; }
.tbl-wrap { max-width: 100%; }
@media (max-width: 900px) {
  .adm { grid-template-columns: minmax(0, 1fr); }
  .adm__side { min-width: 0; position: sticky; top: 68px; z-index: 15; padding: 8px 10px; }
  .adm__nav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .adm__nav::-webkit-scrollbar { display: none; }
  .adm__nav a { padding: 8px 12px; font-size: 14px; background: #151f3d; }
  .adm__main { min-width: 0; }
  .grid--kpi6 { grid-template-columns: 1fr 1fr; }
  .statusbar a { min-width: calc(50% - 4px); }
  .adm__head .row { width: 100%; }
}

.live-list { display: flex !important; flex-direction: column; gap: 2px; margin-top: 4px; }
.live-list em { font-size: 13px; color: var(--ink); background: #f3f6fd; border-radius: 7px; padding: 3px 8px; width: fit-content; max-width: 100%; }
.live-list em.new { animation: livein .5s; background: #e7f8ee; }
@keyframes livein { from { opacity: 0; transform: translateX(-8px); } }
[hidden] { display: none !important; }   /* скрытые элементы не показываем, даже если у класса свой display */
