:root {
  --accent: #FF6B35;
  --accent-dark: #E4531F;
  --navy: #1B263B;
  --navy-2: #33415C;
  --bg: #F2F4F8;
  --card: #ffffff;
  --line: #E4E8EF;
  --text: #1B263B;
  --muted: #5B6B84;
  --green: #2EA97B;
  --amber: #E9A13B;
  --blue: #3D6FD9;
  --red: #D94A3D;
  --r: 14px;
  --shadow: 0 2px 10px rgba(27, 38, 59, .08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #CBD4E0; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- шапка ---------- */
header.top {
  position: sticky; top: 0; z-index: 1100; color: #fff;
  background: linear-gradient(90deg, var(--navy) 0%, #22304A 100%);
  display: flex; align-items: center; gap: 20px; padding: 0 20px; height: 58px;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  border-bottom: 2px solid var(--accent);
}
.logo { font-weight: 800; font-size: 20px; letter-spacing: .5px; color: #fff; display: flex; align-items: center; gap: 8px; }
.logo b { color: var(--accent); }
.logo .tag { font-size: 11px; font-weight: 500; color: #9FB0C9; letter-spacing: 0; margin-left: 4px; }
nav.main { display: flex; gap: 4px; margin-left: auto; }
nav.main a { color: #C9D4E3; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; }
nav.main a:hover { background: rgba(255,255,255,.08); color: #fff; }
nav.main a.active { background: var(--accent); color: #fff; }
.hdr-acc { display: flex; align-items: center; gap: 10px; }
.hdr-user { font-size: 13.5px; font-weight: 700; color: #fff; white-space: nowrap; }
.hdr-user small { color: #9FB0C9; font-weight: 500; }
.hdr-out { color: #9FB0C9; font-size: 13px; }
.hdr-out:hover { color: #fff; }
.hdr-login {
  background: var(--accent); color: #fff !important; font-weight: 700; font-size: 13.5px;
  padding: 8px 16px; border-radius: 9px;
}
.hdr-login:hover { background: var(--accent-dark); }
.hdr-login.alt { background: rgba(255,255,255,.14); }
.hdr-login.alt:hover { background: rgba(255,255,255,.24); }

/* вход: выбор кабинета — покупателям / продавцам */
.role-switch { display: flex; gap: 8px; margin-bottom: 16px; }
.role-switch a {
  flex: 1; text-align: center; padding: 12px 8px; border-radius: 12px;
  border: 1.5px solid var(--line); font-weight: 800; font-size: 14.5px; color: var(--navy);
}
.role-switch a small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.role-switch a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.role-switch a.on small { color: #9FB0C9; }

/* ---------- кнопки, поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 10px 18px; font-size: 14px; font-weight: 700; cursor: pointer; transition: .15s;
  font-family: inherit;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { background: #B9C2D0; cursor: not-allowed; }
.btn.sec { background: #EAEFF6; color: var(--navy); }
.btn.sec:hover { background: #DDE5EF; }
.btn.ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn.ghost:hover { background: #EFF4FD; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.green { background: var(--green); }
.btn.green:hover { background: #249067; }
.btn.danger { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
input, select, textarea {
  font-family: inherit; font-size: 14px; color: var(--text);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff;
  outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
label.f { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 10px 0 4px; }

/* ---------- карточки, чипы ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 600;
  cursor: pointer; user-select: none; transition: .12s; color: var(--navy);
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.green { background: #E2F5EC; color: #187A54; }
.badge.amber { background: #FCF0DA; color: #9C6410; }
.badge.blue { background: #E4EDFF; color: #2452B5; }
.badge.grey { background: #EDF1F6; color: #5B6B80; }
.badge.red { background: #FDE7E4; color: #A93226; }
.badge.orange { background: #FFE8DE; color: #C2440F; }

/* ---------- витрина: 3 колонки ---------- */
.app3 {
  display: grid; grid-template-columns: 360px 1fr 360px;
  height: calc(100vh - 58px);
}
.panel { background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
.pleft { border-right: 1px solid var(--line); }
.pright { border-left: 1px solid var(--line); }
.map-side { position: relative; }
#map { position: absolute; inset: 0; }
.filters {
  position: absolute; z-index: 1000; top: 12px; left: 12px; right: 12px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.side-tabs { display: flex; border-bottom: 1px solid var(--line); background: #fff; flex: none; }
.side-tabs button {
  flex: 1; border: none; background: none; padding: 13px 8px; font: inherit; font-weight: 700;
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; font-size: 13.5px;
}
.side-tabs button.on { color: var(--navy); border-color: var(--accent); }
.pane { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.pane[hidden] { display: none; }

/* чат Алёны */
.ai-head-bar {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: #fff; border-bottom: 1px solid var(--line); flex: none;
}
.ai-head-bar .ava {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.ai-head-bar b { font-size: 14px; display: block; line-height: 1.2; }
.ai-head-bar small { color: var(--muted); font-size: 12px; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.msg.bot { background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(27,38,59,.1); align-self: flex-start; }
.msg.user { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.typing i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #B9C2D0; margin: 0 2px; animation: blink 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .2s; } .msg.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .3 } 50% { opacity: 1 } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 8px; flex: none; }
.ai-chip {
  border: 1.5px solid var(--line); color: var(--navy); background: #fff;
  border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: .12s;
}
.ai-chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.ai-chip:first-child { border-color: var(--accent); color: var(--accent-dark); }
.ai-chip:first-child:hover { background: var(--accent); color: #fff; }
.ai-inp { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); flex: none; }
.ai-inp input { border: none; padding: 8px 4px; }
.ai-inp button {
  background: var(--accent); color: #fff; border: none; border-radius: 10px; width: 42px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none;
}
.ai-inp button:hover { background: var(--accent-dark); }
.ai-pack { border: 1.5px solid var(--line); border-radius: 12px; margin: 10px 0 6px; background: #FBFCFE; }
.ai-item { padding: 8px 12px; border-top: 1px dashed var(--line); }
.ai-item:first-child { border-top: none; }
.ai-item .ai-price { float: right; font-weight: 800; }
.ai-why { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ai-pack-total { padding: 10px 12px; border-top: 1.5px solid var(--line); font-size: 13px; }

/* ручной выбор */
.man-top { padding: 12px; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.man-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.man-tools { display: flex; gap: 8px; margin-bottom: 8px; }
.tool {
  flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 9px; padding: 8px;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--navy); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.tool svg { flex: none; }
.tool:hover { border-color: var(--accent); }
.tool.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.man-sections { flex: 1; overflow-y: auto; padding: 10px 12px; }
.man-group { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.man-ghead {
  display: flex; align-items: center; gap: 8px; padding: 11px 13px; cursor: pointer; user-select: none;
  font-size: 13.5px;
}
.man-ghead:hover { background: #F8FAFD; }
.man-ghead .chev { margin-left: auto; color: var(--muted); }
.man-search-row { padding: 8px 10px 2px; border-top: 1px solid var(--line); }
.man-search-row input { font-size: 13px; padding: 7px 10px; }
.man-list { border-top: 1px solid var(--line); max-height: 300px; overflow-y: auto; }
.man-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 13px; cursor: pointer;
  border-top: 1px dashed #EEF2F7; font-size: 13px;
}
.man-item:hover { background: #FFF8F4; }
.man-item.busy { opacity: .5; cursor: not-allowed; }
.man-item input { width: auto; accent-color: var(--accent); }
.mi-t { flex: 1; font-weight: 600; }
.mi-t i { font-style: normal; color: var(--muted); font-weight: 500; }
.mi-t small { display: block; color: var(--muted); font-weight: 400; }
.mi-p { font-weight: 700; white-space: nowrap; font-size: 12.5px; }
.man-foot { padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); flex: none; }
.eye {
  background: none; border: none; color: #9AA7B8; cursor: pointer; padding: 2px;
  display: inline-flex; align-items: center; flex: none;
}
.eye:hover { color: var(--navy); }
.eye.off { color: #CBD3DE; }
.man-item.ghosted .mi-t, .man-item.ghosted .mi-p, .man-item.ghosted .mi-btn { opacity: .45; }

/* предложение справа */
.offer-head {
  padding: 15px 16px; font-weight: 800; font-size: 12.5px; background: #fff;
  text-transform: uppercase; letter-spacing: .06em; color: var(--navy);
  border-bottom: 1px solid var(--line); flex: none; display: flex; align-items: center; gap: 8px;
}
.offer-body { flex: 1; overflow-y: auto; padding: 12px; }
.offer-foot { padding: 12px 14px; background: #fff; border-top: 1px solid var(--line); flex: none; }
.offer-empty { text-align: center; color: var(--muted); padding: 20px 6px; font-size: 13.5px; }
.offer-empty img {
  width: 100%; border-radius: 12px; margin-bottom: 14px; display: block;
  box-shadow: 0 6px 20px rgba(27, 38, 59, .18);
}
.offer-empty a { display: inline-block; margin-top: 10px; font-weight: 600; }
.ok-circle {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px;
  background: #E2F5EC; color: #187A54; font-size: 28px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.og { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.og-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; cursor: pointer; user-select: none; font-size: 13.5px; }
.og-head:hover { background: #F8FAFD; }
.og-sum { margin-left: auto; font-weight: 800; }
.og-head .chev { color: var(--muted); }
.og-item { display: flex; gap: 8px; padding: 9px 13px; border-top: 1px dashed #EEF2F7; align-items: flex-start; }
.og-item .grow { flex: 1; }
.og-item .t { font-weight: 700; font-size: 13px; cursor: pointer; }
.og-item .t:hover { color: var(--accent-dark); }
.og-item .per { color: var(--muted); font-size: 12px; }
.og-item .sum { font-weight: 800; white-space: nowrap; font-size: 13px; }
.inv-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 800; padding: 4px 0 8px; }
.x { background: none; border: none; color: #B9C2D0; font-size: 16px; cursor: pointer; padding: 0 2px; }
.x:hover { color: var(--red); }

/* полоса доступности */
.avail { display: flex; gap: 3px; margin: 8px 0; }
.avail i {
  flex: 1; height: 22px; border-radius: 5px; background: #DFF2E9; position: relative;
  font-style: normal; font-size: 9px; color: #1F7A55; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 2px; overflow: hidden;
}
.avail i.busy { background: #F6D4CF; color: #A93226; }
.avail i.sel { outline: 2px solid var(--navy); background: #FFD9A8; color: #7A4B00; }

/* ---------- модалки ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal h3 { margin-bottom: 12px; font-size: 19px; }
.modal .close { float: right; background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; }

/* ---------- кабинеты ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.tabs { display: flex; gap: 6px; margin: 18px 0; flex-wrap: wrap; }
.tabs button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 18px;
  font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer;
}
.tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
h1.page { font-size: 24px; margin-bottom: 4px; }
.sub { color: var(--muted); font-size: 14px; }

/* канбан */
.kanban { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: start; }
.kcol { background: #EBEFF5; border-radius: 12px; padding: 10px; min-height: 120px; }
.kcol h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 2px 6px 8px; display: flex; justify-content: space-between; }
.kcard {
  background: #fff; border-radius: 10px; padding: 11px 12px; margin-bottom: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(27,38,59,.07); cursor: pointer; font-size: 13px; transition: .12s;
}
.kcard:hover { box-shadow: 0 4px 12px rgba(27,38,59,.14); border-color: #CBD4E0; }
.kcard .c { font-weight: 800; font-size: 13.5px; }
.kcard .m { color: var(--muted); font-size: 12px; margin: 3px 0; }
.kcard .s { font-weight: 800; margin-top: 4px; }

/* календарь */
.cal { overflow-x: auto; }
.cal table { border-collapse: collapse; width: 100%; min-width: 900px; }
.cal th, .cal td { border: 1px solid var(--line); padding: 6px 8px; font-size: 12.5px; text-align: center; }
.cal th { background: #fff; color: var(--muted); font-size: 11.5px; }
.cal td.name { text-align: left; font-weight: 700; background: #fff; min-width: 210px; font-size: 12.5px; }
.cal td.name small { color: var(--muted); font-weight: 500; display: block; }
.cal td.cell { height: 34px; min-width: 52px; background: #EFF6F1; cursor: default; }
.cal td.cell.booked { background: #BBD4FF; cursor: pointer; }
.cal td.cell.live { background: #FFC5AB; cursor: pointer; }
.cal td.cell.unpaid { background: #FFEBB0; cursor: pointer; }
.cal td.cell.done { background: #E0E4EA; cursor: pointer; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend .dot { width: 13px; height: 13px; border-radius: 4px; }

/* таблицы */
table.list { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }

/* этапы */
.stages { display: flex; gap: 0; margin: 10px 0; flex-wrap: wrap; }
.stage { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.stage .n {
  width: 22px; height: 22px; border-radius: 50%; background: #E3E8EF; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
}
.stage.past .n { background: #CBEBDD; color: #187A54; }
.stage.cur .n { background: var(--accent); color: #fff; }
.stage.cur { color: var(--navy); font-weight: 700; }
.stage .bar { width: 26px; height: 2px; background: #E3E8EF; margin: 0 4px; }

.gal { display: flex; gap: 8px; flex-wrap: wrap; }
.gal img { width: 110px; height: 74px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1.5px solid var(--line); }
.gal img:hover { border-color: var(--accent); }

.stat { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat .v { font-size: 24px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.note { background: #FFF6EF; border: 1.5px solid #FFD9C2; border-radius: 12px; padding: 12px 16px; font-size: 13px; color: #7A4B2A; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 3000;
  background: var(--navy); color: #fff; padding: 12px 22px; border-radius: 12px; font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,.3); animation: pop .2s;
}
.toast.err { background: var(--red); }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

/* счёт на печать */
.invoice-doc { font-size: 13.5px; }
.invoice-doc h2 { font-size: 18px; margin: 4px 0 12px; }
.invoice-doc table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.invoice-doc th, .invoice-doc td { border: 1px solid #999; padding: 6px 8px; font-size: 12.5px; text-align: left; }
.invoice-doc .req { color: #444; font-size: 12px; line-height: 1.5; }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; inset: 0; padding: 30px; }
}

/* ---------- вход / регистрация ---------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 58px); }
.auth-hero {
  background: var(--navy) url('assets/hero-login.jpg') center/cover no-repeat;
  position: relative; display: flex; align-items: flex-end;
}
.auth-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27,38,59,.15) 30%, rgba(27,38,59,.82) 100%);
}
.auth-hero-text { position: relative; z-index: 1; color: #fff; padding: 40px; }
.auth-hero-text h2 { font-size: 30px; line-height: 1.2; margin-bottom: 10px; }
.auth-hero-text h2 b { color: var(--accent); }
.auth-hero-text p { color: #D5DEEA; font-size: 14.5px; max-width: 440px; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 26px; margin-bottom: 4px; }
.auth-tabs { display: flex; gap: 6px; margin: 18px 0 6px; }
.auth-tabs button {
  flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 10px;
  font: inherit; font-weight: 700; color: var(--muted); cursor: pointer;
}
.auth-tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.role-pick label {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer;
  font-size: 13px; font-weight: 700; display: flex; gap: 8px; align-items: flex-start; background: #fff;
}
.role-pick label small { display: block; color: var(--muted); font-weight: 500; }
.role-pick input { width: auto; accent-color: var(--accent); margin-top: 2px; }
.role-pick label:has(input:checked) { border-color: var(--accent); background: #FFF8F4; }
.demo-creds { background: #fff; border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.demo-creds b { color: var(--navy); }
.demo-creds a { cursor: pointer; }

/* ---------- карт-редактор адресов владельца ---------- */
.geo-ov { position: fixed; inset: 0; z-index: 2500; background: var(--bg); display: flex; flex-direction: column; }
.geo-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  background: #fff; border-bottom: 1px solid var(--line); flex: none;
}
.geo-head b { font-size: 15px; }
.geo-body { flex: 1; display: grid; grid-template-columns: 390px 1fr; overflow: hidden; }
.ge-side {
  padding: 14px; overflow-y: auto; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
#geMap { height: 100%; }
.ge-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ge-mode {
  border: 1.5px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 4px;
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--navy);
}
.ge-mode:hover { border-color: var(--accent); }
.ge-mode.on { border-color: var(--accent); background: #FFF8F3; }
.ge-sg { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-bottom: 6px; }
.ge-sg .t { font-size: 13px; font-weight: 600; }
.ge-sg .a { display: flex; gap: 6px; margin-top: 7px; }
.ge-card { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ge-houses { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; max-height: 130px; overflow-y: auto; }
.ge-houses span {
  background: #F5F1FB; border: 1px solid #E5DBF5; color: #5B3E99; border-radius: 999px;
  padding: 3px 9px; font-size: 12px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center;
}
.ge-houses i { font-style: normal; cursor: pointer; color: #B9A8D8; }
.ge-houses i:hover { color: var(--red); }
.ge-done { font-size: 12.5px; color: #187A54; font-weight: 600; padding: 2px 0; }
@media (max-width: 900px) { .geo-body { grid-template-columns: 1fr; grid-template-rows: 45% 1fr; } .ge-side { border-right: none; border-bottom: 1px solid var(--line); } }

/* брендовая подпись вместо логотипа Leaflet в атрибуции карты */
.brand-attr { font-weight: 800; color: var(--navy); letter-spacing: .3px; }
.brand-attr b { color: var(--accent); }

/* щит с направлением обзора */
.dir-icon {
  width: 26px; height: 26px; position: relative; transform: rotate(var(--rot));
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}
.dir-icon::before { content: ''; width: 18px; height: 9px; background: var(--c); border: 2px solid #fff; border-radius: 2px; }
.dir-icon::after {
  content: ''; position: absolute; top: -4px; left: 50%; margin-left: -4px;
  border: 4px solid transparent; border-bottom: 6px solid var(--c);
}

/* ---------- конструктор макета ---------- */
.modal:has(.studio) { max-width: 900px; }
.studio { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.studio-prev canvas { width: 100%; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; }
.emoji-row, .pal-row { display: flex; gap: 6px; flex-wrap: wrap; }
.emoji-row span {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line); border-radius: 9px; font-size: 19px; cursor: pointer; background: #fff;
}
.emoji-row span.on { border-color: var(--accent); background: #FFF1E9; }
.pal-row span { width: 40px; height: 30px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.pal-row span.on { border-color: var(--navy); }
@media (max-width: 720px) { .studio { grid-template-columns: 1fr; } }

/* карточка поверхности */
.s-modal { display: grid; gap: 16px; }
.s-modal h3 { margin-bottom: 2px; }
.reach { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reach > div {
  background: #FFF8F3; border: 1px solid #FFE4D3; border-radius: 12px; padding: 13px 16px;
}
.reach b { display: block; font-size: 22px; font-weight: 800; color: var(--accent-dark); line-height: 1.15; }
.reach span { font-size: 12px; color: var(--muted); }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price-row .price { font-size: 22px; font-weight: 800; }
.price-row .price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.price-row select { width: 130px; }
/* форматы лифтовой доски */
.fmt-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fmt {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 6px;
  font: inherit; cursor: pointer; display: grid; gap: 1px; text-align: center; transition: .12s;
}
.fmt b { font-size: 15px; }
.fmt span { font-size: 11px; color: var(--muted); }
.fmt i { font-style: normal; font-size: 12px; font-weight: 700; }
.fmt:hover:not(:disabled) { border-color: var(--accent); }
.fmt.on { border-color: var(--accent); background: #FFF8F3; }
.fmt.on i { color: var(--accent-dark); }
.fmt:disabled { opacity: .38; cursor: not-allowed; }
.orient-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.orient {
  border: 1.5px solid var(--line); background: #fff; border-radius: 9px; padding: 8px;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--navy); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .12s;
}
.orient:hover:not(:disabled) { border-color: var(--accent); }
.orient.on { border-color: var(--accent); background: #FFF8F3; color: var(--accent-dark); }
.orient:disabled { opacity: .38; cursor: not-allowed; }
.orient .mini { display: inline-block; background: currentColor; opacity: .55; border-radius: 2px; }
.orient .mv { width: 9px; height: 14px; }
.orient .mh { width: 14px; height: 9px; }
.board-wrap { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
/* доска: ячейка = горизонтальный лист А7 (пропорция 105×74), листы рисуются форматами */
.lift-board { position: relative; flex: none; width: 216px; aspect-ratio: 630 / 444; }
.lb-cells, .lb-sheets {
  position: absolute; inset: 0; display: grid; gap: 3px;
  grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr);
}
.lb-cells i { background: #EFF2F7; border: 1px solid #E3E8EF; border-radius: 3px; }
.sheet {
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  background: #8E9BAD; border: 1px solid #7E8C9F;
}
.sheet.g1 { background: #A7B2C2; border-color: #96A3B5; }
.sheet.pick { background: var(--accent); border-color: var(--accent-dark); box-shadow: 0 2px 8px rgba(228, 83, 31, .35); }
.mi-btn {
  flex: none; border: 1.5px solid var(--accent); color: var(--accent-dark); background: #fff;
  border-radius: 999px; padding: 6px 13px; font-size: 12px; font-weight: 700;
  white-space: nowrap; transition: .12s; box-shadow: 0 1px 4px rgba(228, 83, 31, .14);
}
.man-item.lift { cursor: pointer; }
.man-item.lift:hover .mi-btn { background: var(--accent); color: #fff; box-shadow: 0 3px 10px rgba(228, 83, 31, .3); }
.board-wrap .sub { font-size: 12.5px; }
.avail i.part { background: linear-gradient(135deg, #DFF2E9 55%, #FCE3C8 55%); color: #1F7A55; }
.cal td.cell.part { background: #FFF3D6; font-size: 11px; font-weight: 700; color: #8A6210; cursor: pointer; }

.addr-details summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--blue); list-style: none; user-select: none;
}
.addr-details summary::-webkit-details-marker { display: none; }
.addr-details summary::before { content: '▸  '; font-size: 11px; }
.addr-details[open] summary::before { content: '▾  '; }
.addr-details .addr-list { margin-top: 10px; }
.addr-list { display: flex; flex-wrap: wrap; gap: 5px; max-height: 110px; overflow-y: auto; }
.addr-list span {
  background: #F6F8FB; color: var(--navy-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}

/* тултипы карты в стиле бренда */
.leaflet-tooltip {
  background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(27, 38, 59, .16);
  font: 600 12px/1.35 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 6px 10px;
}
.leaflet-tooltip:before { display: none; }
.chev { font-size: 10px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1200px) {
  .app3 { grid-template-columns: 320px 1fr 320px; }
}
@media (max-width: 980px) {
  .app3 { grid-template-columns: 1fr; grid-template-rows: auto 55vh auto; height: auto; }
  .pleft, .pright { border: none; border-bottom: 1px solid var(--line); max-height: 60vh; }
  .map-side { min-height: 55vh; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { min-height: 240px; }
  .kanban { grid-template-columns: 1fr; }
  nav.main a { padding: 8px 9px; font-size: 12.5px; }
  .logo .tag { display: none; }
}

/* ---------- графики ---------- */
svg .bar {
  transform-origin: center bottom; transform-box: fill-box;
  animation: barGrow .55s cubic-bezier(.2, .7, .3, 1) backwards;
}
@keyframes barGrow { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { svg .bar { animation: none; } }

/* ---------- наряды на монтаж ---------- */
.nar-zones { display: flex; flex-wrap: wrap; gap: 18px; }
.nar-zone { min-width: 300px; }
.nar-zt { margin-bottom: 8px; font-size: 13.5px; }
.nar-sheet { position: relative; border-width: 3px; border-style: solid; }
.nar-sheet i {
  position: absolute; left: 3px; bottom: 3px; font-style: normal; color: #fff;
  font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px;
}
.nar-order {
  border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: 10px; padding: 12px 14px; margin-top: 10px;
}
.nar-addrs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.nar-addrs span {
  background: #F2F5F9; border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 9px; font-size: 12px; font-weight: 600;
}
@media print { .print-only { display: block !important; } }

/* печатные листы нарядов: карта с контурами домов + список адресов */
.nar-sheet-page { page-break-after: always; padding-bottom: 12px; }
.nar-map-wrap { overflow: hidden; border: 1.5px solid var(--line); border-radius: 10px; margin-top: 6px; position: relative; }
.nar-map { position: relative; transform-origin: top left; }
.nar-addr-list { columns: 2; column-gap: 24px; font-size: 12px; margin-top: 6px; }
.nar-addr-list div { break-inside: avoid; padding: 2.5px 0; border-bottom: 1px dashed #D8DFE9; }
