:root {
  --teal: #0E4E4E; --teal2: #2FA099; --coral: #F4715A; --coral-d: #C9513C;
  --cream: #FAF8F3; --mint: #EAF5F2; --peach: #FDEAE4; --amber: #E3A33B; --amber-bg: #FCF1DC;
  --ink: #1F2D2D; --muted: #6B7B7A; --line: #DCE5E3; --white: #fff; --grey: #A3AEAD;
  --radius: 12px; --top: 56px; --tabs: 0px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink); -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--cream); }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; color: var(--teal); }
.muted { color: var(--muted); }
.center { text-align: center; padding: 16px; }
.err { color: var(--coral-d); min-height: 1.2em; margin: 0; font-size: 14px; }
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  font-size: 16px; /* без зума на iOS */
}
input:focus, textarea:focus { outline: 2px solid var(--teal2); outline-offset: 0; border-color: var(--teal2); }
textarea { resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer; text-decoration: none; color: inherit;
  font-size: 15px; white-space: nowrap;
}
.btn:hover { border-color: var(--teal2); }
.btn.primary { background: var(--coral); border-color: var(--coral); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--coral-d); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--teal); }
a.btn { color: var(--teal); }
a.btn.primary { color: #fff; }
.btn.ghost:hover { background: var(--mint); }
.btn.danger { color: var(--coral-d); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: progress; }

/* бренд */
.brand-mark { width: 44px; height: 44px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--coral);
  position: relative; margin: 0 auto 6px; }
.brand-mark::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: #fff; }
.brand-mark.sm { width: 22px; height: 22px; margin: 0; }

/* вход */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--mint), var(--cream) 60%); }
.login-card { width: min(380px, 100%); background: var(--white); border-radius: 18px; padding: 28px 24px; display: grid; gap: 14px;
  box-shadow: 0 10px 30px rgba(14,78,78,.10); text-align: center; }
.login-card label { display: grid; gap: 6px; text-align: left; font-size: 14px; color: var(--muted); }
.login-card p { margin: 0; }

/* каркас */
/* каркас админки */
.shell { height: 100%; display: grid; grid-template-columns: 216px 1fr; }
.side { background: var(--teal); color: #fff; display: flex; flex-direction: column; padding: 14px 10px; gap: 18px; z-index: 1500; }
.side-brand { display: flex; align-items: center; gap: 8px; padding: 2px 8px; font-size: 17px; }
.env { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .06em; background: var(--coral); color: #fff; border-radius: 6px; padding: 2px 6px; }
.env:empty { display: none; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 10px; color: #CFE5E2; text-decoration: none; font-size: 15px; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--coral); }
.nav .ico { width: 20px; height: 20px; flex: none; opacity: .9; }
.side-foot { margin-top: auto; display: grid; gap: 4px; padding: 0 8px; font-size: 14px; color: #CFE5E2; }
/* v1.3.1: ссылка на хаб проекта — отдельно, под чертой; версия админки внизу меню и под формой входа */
.nav .nav-hub { margin-top: 10px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.16); border-radius: 0 0 10px 10px; }
.side-foot .ver { font-size: 12px; opacity: .7; }
.login-ver { margin: 4px 0 0; text-align: center; font-size: 12px; color: var(--muted, #607070); }
.btn.ghost.inv { color: #fff; justify-content: flex-start; padding-left: 0; }
.btn.ghost.inv:hover { background: transparent; text-decoration: underline; }
.scrim { position: fixed; inset: 0; background: rgba(14,78,78,.35); z-index: 1400; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
.top { height: var(--top); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--white);
  border-bottom: 1px solid var(--line); }
.menu-btn { display: none; font-size: 20px; padding: 6px 10px; }
.sec-title { font-size: 18px; }
.top-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.sec { flex: 1; min-height: 0; }
.sec-places { display: flex; flex-direction: column; }
.sec-page { overflow-y: auto; }
.subbar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--white); border-bottom: 1px solid var(--line); }
.subbar .summary { justify-content: flex-start; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--teal); }
.brand b { font-size: 17px; }
.brand .muted { font-size: 13px; }
.summary { display: flex; gap: 6px; flex: 1; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.summary::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; gap: 4px; align-items: baseline; padding: 4px 10px; border-radius: 999px; background: var(--mint);
  font-size: 13px; white-space: nowrap; color: var(--teal); }
.pill b { font-size: 15px; }
.pill.ok { background: #D8F0E4; color: #1E6B45; }
.pill.bad { background: var(--peach); color: var(--coral-d); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.who { font-size: 14px; color: var(--muted); padding: 0 6px; }

.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 420px 1fr; }
.panel { overflow-y: auto; background: var(--cream); border-right: 1px solid var(--line); padding: 14px; }
.map-wrap { position: relative; min-height: 0; }
.map { position: absolute; inset: 0; }
.tabs { display: none; }

/* список */
.list-tools { display: grid; gap: 10px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 7px 12px; font-size: 14px; cursor: pointer;
  min-height: 36px; text-align: left; }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip .n { opacity: .7; margin-left: 4px; }
.add { margin-bottom: 12px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 10px 14px; cursor: pointer;
  display: grid; gap: 4px; border-left: 4px solid var(--grey); }
.card:hover, .card.sel { border-color: var(--teal2); }
.card.st-published { border-left-color: var(--teal2); }
.card.st-draft { border-left-color: var(--amber); }
.card.st-hidden { opacity: .7; }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card-name { font-weight: 600; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.published { background: #D8F0E4; color: #1E6B45; }
.badge.draft { background: var(--amber-bg); color: #8A5A0B; }
.badge.hidden { background: #ECEFEF; color: var(--muted); }
.card-sub { font-size: 13px; color: var(--muted); }
.card-warn { font-size: 13px; color: var(--coral-d); }

/* карточка места */
.editor-head { display: flex; align-items: center; gap: 6px; margin: -4px 0 10px -8px; }
.editor-head h2 { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#placeForm { display: grid; gap: 16px; padding-bottom: 24px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: 14px; font-weight: 600; color: var(--teal); padding: 0; display: flex; justify-content: space-between; gap: 8px; }
.field i { color: var(--coral); font-style: normal; }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.counter { font-weight: 400; color: var(--muted); }
.counter.over { color: var(--coral-d); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.pick-map { height: 240px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.pick-tools { display: flex; gap: 8px; }
.pick-tools input { flex: 1; min-width: 0; font-size: 14px; }
.coords { margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.warn { margin: 0; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--amber-bg); color: #6F4A08; }

.amen { display: grid; gap: 6px; }
.amen-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; font-size: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); }
.seg button { border: 0; background: transparent; padding: 7px 12px; min-height: 36px; cursor: pointer; font-size: 14px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--teal); color: #fff; }
.seg button[data-v="no"][aria-pressed="true"] { background: var(--coral-d); }
.seg button[data-v="unknown"][aria-pressed="true"] { background: var(--grey); }
#statusSeg button[data-v="published"][aria-pressed="true"] { background: var(--teal2); }
#statusSeg button[data-v="draft"][aria-pressed="true"] { background: var(--amber); }
#statusSeg button[data-v="hidden"][aria-pressed="true"] { background: var(--grey); }

.photo { display: grid; gap: 8px; }
.photo img { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius); background: var(--mint); }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#photoRights { display: grid; gap: 6px; }
.photo-meta { display: grid; gap: 10px; margin-top: 4px; }

.missing { font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--peach); color: var(--coral-d); }
.missing.ok { background: #D8F0E4; color: #1E6B45; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; bottom: -14px; background: var(--cream);
  padding: 10px 0 14px; border-top: 1px solid var(--line); }
.form-actions .primary { flex: 1; min-height: 46px; font-size: 16px; }
.meta { font-size: 12px; margin: 0; flex-basis: 100%; }
.form-extra { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: -6px; }
.form-extra .btn { padding-left: 0; }
.pill .s { display: none; }

/* карта: метки */
.pin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pin.published { background: var(--teal2); }
.pin.draft { background: var(--amber); }
.pin.hidden { background: var(--grey); }
.pin.sel { width: 22px; height: 22px; outline: 3px solid var(--coral); }
/* v1.5.1: обёртка нужна MapLibre (её transform), капля повёрнута внутри; острие — ровно по низу обёртки */
.pick-pin-wrap { width: 30px; height: 38px; }
.pick-pin { position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--coral);
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.maplibregl-map { font: inherit; background: var(--mint); }
.maplibregl-popup-content { font-size: 12px; padding: 4px 8px; border-radius: 6px; }
.maplibregl-control-container .maplibregl-ctrl-attrib { font-size: 10px; }
.mw-other-place { width: 10px; height: 10px; border: 1px solid #fff; border-radius: 50%;
  background: #2FA099; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.maplibregl-marker { cursor: pointer; }
.maplibregl-marker.maplibregl-marker-draggable { cursor: grab; }
.map-off { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  font-size: 14px; color: var(--muted); background: var(--mint); }

/* история */
.dlg { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100% - 24px)); max-height: 80vh; }
.dlg::backdrop { background: rgba(14,78,78,.35); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--white); }
.hist { margin: 0; padding: 8px 16px 16px 36px; display: grid; gap: 12px; font-size: 14px; }
.hist .when { color: var(--muted); font-size: 13px; }
.hist ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink); }

.toast { position: fixed; left: 50%; bottom: calc(24px + var(--tabs)); transform: translateX(-50%); background: var(--teal); color: #fff;
  padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); z-index: 2000; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.bad { background: var(--coral-d); }
.toast button { margin-left: 10px; background: #fff; color: var(--teal); border: 0; border-radius: 6px; padding: 4px 8px; cursor: pointer; }

/* телефон */
@media (max-width: 899px) {
  :root { --top: 52px; --tabs: 56px; }
  .hide-sm { display: none !important; }
  .summary { justify-content: flex-start; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 30px rgba(0,0,0,.25); }
  .menu-btn { display: inline-flex; margin-left: -8px; }
  .top { padding: 0 10px; }
  .subbar { padding: 6px 10px; }
  .layout { grid-template-columns: 1fr; padding-bottom: var(--tabs); }
  .panel { border-right: 0; }
  .layout[data-view="list"] .map-wrap { display: none; }
  .layout[data-view="map"] #listPanel { display: none; }
  .layout.editing .map-wrap { display: none; }
  .layout.editing ~ .tabs { display: none; }
  .layout.editing { padding-bottom: 0; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabs);
    background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 1000; }
  .tabs button { border: 0; background: transparent; font-size: 15px; color: var(--muted); }
  .tabs button.on { color: var(--teal); font-weight: 700; box-shadow: inset 0 3px 0 var(--coral); }
  .pick-map { height: 260px; }
  .pill .l { display: none; }
  .pill .s { display: inline; }
  .top { gap: 8px; }
}

/* страницы разделов */
.page { padding: 16px; display: grid; gap: 14px; max-width: 1200px; }
.page.narrow { max-width: 760px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; }
.card h2 { font-size: 18px; margin-bottom: 8px; }
.card p { margin: 6px 0; line-height: 1.5; }
.card ul { margin: 6px 0; padding-left: 20px; line-height: 1.6; }
.notice { border-color: var(--amber); background: var(--amber-bg); }
.small { font-size: 12px; }
.sec-h { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 -4px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
#svBody { display: grid; gap: 14px; }
#svBody.loading { opacity: .55; transition: opacity .2s; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; position: sticky; top: 0; z-index: 5; }
.tb-field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.tb-field input, .tb-field select { font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); min-height: 36px; }
.tb-field.grow { flex: 1; min-width: 200px; }
.tb-field.grow select { width: 100%; }
.tb-check { display: flex; gap: 6px; align-items: center; font-size: 14px; min-height: 36px; }
.tb-check input { width: 18px; height: 18px; accent-color: var(--teal); }
.tb-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.tile-n { font-size: 34px; font-weight: 700; color: var(--teal); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-l { font-size: 14px; color: var(--ink); margin-top: 2px; }
.tile-s { font-size: 12px; color: var(--muted); margin-top: 4px; }

.q-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.q-head h3 { font-size: 15px; }
.q-head .muted { font-size: 12px; }

.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hbars > li { display: grid; grid-template-columns: minmax(120px, 42%) 1fr 72px; align-items: center; gap: 10px; font-size: 13px; }
.hb-label { line-height: 1.3; }
.hb-track { height: 12px; background: var(--mint); border-radius: 4px; overflow: hidden; }
.hb-bar { display: block; height: 100%; background: var(--teal2); border-radius: 0 4px 4px 0; min-width: 2px; }
.hb-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-val small { font-weight: 400; color: var(--muted); }
.hbars.matrix > li { grid-template-columns: minmax(160px, 45%) 1fr 108px; }
.hbars > li:hover .hb-bar { background: var(--teal); }

.days { display: grid; gap: 4px; }
.days-plot { height: 150px; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--line); }
.day { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.day-bar { width: 100%; max-width: 36px; background: var(--teal2); border-radius: 4px 4px 0 0; min-height: 1px; }
.day:hover .day-bar { background: var(--teal); }
.day-n { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.days-axis { display: flex; gap: 3px; }
.days-axis span { flex: 1; font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; min-width: 0; }

details.mini { margin-top: 6px; font-size: 13px; }
details.mini summary { cursor: pointer; color: var(--teal); }
details.mini ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink); }
.quotes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 360px; overflow-y: auto; }
.quotes li { background: var(--cream); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.quotes li p { margin: 0 0 2px; white-space: pre-wrap; }
.quotes li span { font-size: 12px; }

.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.hl td { background: var(--amber-bg); }
.cmd { background: var(--cream); border-radius: 10px; padding: 10px 12px; font-size: 12px; overflow-x: auto; margin: 12px 0 0; }

@media (max-width: 899px) {
  .page { padding: 10px; gap: 10px; }
  .toolbar { position: static; }
  .grid2 { grid-template-columns: 1fr; }
  .hbars > li, .hbars.matrix > li { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .hb-val small { font-size: 11px; }
  .hbars > li .hb-label { grid-column: 1 / -1; }
  .tile-n { font-size: 28px; }
}

/* ---------- Модерация фото (Этап 2) ---------- */
.nav-badge { margin-left: auto; background: var(--coral); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.mod-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mod-tabs .btn.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.mod-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.mod-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--mint); display: block; cursor: zoom-in; }
.mod-body { padding: 12px; display: grid; gap: 8px; }
.mod-who { font-weight: 600; color: var(--teal); }
.mod-meta { font-size: 13px; color: var(--muted); }
.mod-warn { font-size: 13px; color: var(--coral-d); }
.mod-actions { display: flex; gap: 8px; }
.mod-actions .btn { flex: 1; justify-content: center; }
.btn.ok { background: var(--teal2); border-color: var(--teal2); color: #fff; font-weight: 600; }
.mod-reject { display: grid; gap: 6px; }
.mod-reject select, .mod-reject textarea { font-size: 14px; }
.mod-rules { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.mod-zoom { position: fixed; inset: 0; background: rgba(0,0,0,.8); display: grid; place-items: center; z-index: 3000; cursor: zoom-out; }
.mod-zoom img { max-width: 92vw; max-height: 92vh; border-radius: 10px; }

/* ---------- v1.5.0: раздел «Вход и SMS» ---------- */
.ao-head { border-left: 6px solid var(--teal2); }
.ao-head.ao-warn { border-left-color: var(--amber); background: var(--amber-bg); }
.ao-head.ao-bad { border-left-color: var(--coral-d); background: var(--peach); }
.ao-head-t { display: flex; align-items: center; gap: 10px; }
.ao-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--teal2); flex: none; }
.ao-warn .ao-dot { background: var(--amber); }
.ao-bad .ao-dot { background: var(--coral-d); }
.ao-chip { display: inline-block; width: max-content; max-width: 100%; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--mint); color: var(--teal); white-space: nowrap; }
.ao-chip.ao-warn { background: var(--amber-bg); color: #8A5A0B; }
.ao-chip.ao-bad { background: var(--peach); color: var(--coral-d); }
.ao-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: 14px; }
.ao-dl dt { color: var(--muted); }
.ao-dl dd { margin: 0; overflow-wrap: anywhere; }
.hb-bar.ao-bar-warn { background: var(--amber); }
.hb-bar.ao-bar-bad { background: var(--coral-d); }
.ao-budget > li { grid-template-columns: minmax(120px, 34%) 1fr minmax(120px, auto); }
.ao-mail { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ao-mail p { margin: 0; }
.ao-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.ao-al { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; background: var(--cream); border-radius: 10px; padding: 8px 12px; }
.ao-al-m { font-size: 14px; line-height: 1.4; }
.ao-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--mint); color: var(--teal); }
.ao-al-warning .ao-ico { background: var(--amber-bg); color: #8A5A0B; }
.ao-al-critical { background: var(--peach); }
.ao-al-critical .ao-ico { background: var(--coral-d); color: #fff; }
.ao-mono { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 899px) {
  .ao-budget > li { grid-template-columns: 1fr; gap: 4px; }
  .ao-budget .hb-val { text-align: left; }
}

/* ---------- v1.6.0: раздел «Маркетинг» ---------- */
.mk-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.mk-tabs::-webkit-scrollbar { display: none; }
.mk-tabs a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--teal);
  text-decoration: none; font-size: 14px; white-space: nowrap; }
.mk-tabs a:hover { border-color: var(--teal2); }
.mk-tabs a.on { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.mk-body { display: grid; gap: 14px; min-width: 0; }
.mk-hint { margin: 0; font-size: 14px; color: var(--muted); }
.mk-demo { border-color: var(--amber); background: var(--amber-bg); }
.mk-demo p { margin: 0; font-size: 14px; }
.mk-stub { border-style: dashed; }
.mk-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--mint); color: var(--teal); }
.mk-chip.mk-ok { background: #D8F0E4; color: #1E6B45; }
.mk-chip.mk-warn { background: var(--amber-bg); color: #8A5A0B; }
.mk-chip.mk-bad { background: var(--peach); color: var(--coral-d); }
.mk-chip.mk-muted { background: #ECEFEF; color: var(--muted); }
.mk-src { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; vertical-align: 1px; }
.mk-src-live { background: #D8F0E4; color: #1E6B45; }
.mk-src-demo { background: var(--amber-bg); color: #8A5A0B; }
.mk-src-none { background: #ECEFEF; color: var(--muted); }
.mk-target { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.mk-funnel > li { grid-template-columns: minmax(150px, 38%) 1fr 110px; }
.hb-bar.mk-bar-demo { background: repeating-linear-gradient(135deg, var(--amber) 0 6px, #EBC27A 6px 12px); }
.hb-track { display: flex; }
.hb-bar.mk-bar-plan { background: #BFE3DE; border-radius: 0 4px 4px 0; }
.mk-tbl td { cursor: pointer; }
.mk-row:hover td, .mk-row:focus td { background: var(--mint); outline: none; }
.mk-code { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--teal); font-weight: 600; }
.mk-main { font-weight: 600; min-width: 200px; }
.mk-counts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mk-counts li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.mk-counts li a { text-decoration: none; }
.mk-counts li.zero { opacity: .55; }
.mk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.mk-list li { line-height: 1.4; }
.mk-list a { color: var(--teal); }
.mk-date { display: inline-block; min-width: 92px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.mk-overdue .mk-date { color: var(--coral-d); font-weight: 600; }
.mk-overdue .mk-chip { margin-left: 6px; }
.mk-tools select { min-width: 180px; }
.mk-dlg { width: min(720px, calc(100% - 16px)); max-height: 92vh; }
.mk-dlg-body { padding: 14px 16px 4px; overflow-y: auto; }
.mk-form { display: grid; gap: 14px; }
.mk-form select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 16px; }
.mk-form .field.mk-bool { display: flex; align-items: center; gap: 10px; }
.mk-form .field.mk-bool input { width: 20px; height: 20px; accent-color: var(--teal); flex: none; }
.mk-form .field.mk-bool span { font-weight: 400; color: var(--ink); }
.mk-form .form-actions { bottom: -4px; background: var(--white); }
.mk-form .err { margin-top: -6px; }
.mk-links { display: grid; gap: 10px; background: var(--mint); border-radius: 12px; padding: 12px; }
.mk-links h4 { margin: 0; color: var(--teal); font-size: 14px; }
.mk-link { display: grid; gap: 4px; }
.mk-link-l { font-size: 13px; font-weight: 600; color: var(--teal); }
.mk-link-l small { font-weight: 400; }
.mk-link-v { display: flex; gap: 6px; align-items: center; min-width: 0; }
.mk-link-v code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: var(--white); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; font-size: 12px; scrollbar-width: thin; }
.mk-qr { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.mk-qr svg { width: 148px; height: 148px; background: #fff; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.mk-qr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 899px) {
  .mk-funnel > li { grid-template-columns: 1fr auto; }
  .mk-dlg { width: 100%; max-height: 100vh; height: 100%; max-width: none; margin: 0; border-radius: 0; }
  .mk-tools .tb-field { flex: 1 1 100%; }
  .mk-main { min-width: 160px; }
}
.mk-body .card { align-content: start; }
.mk-body .card ul.mk-list, .mk-body .card ul.mk-counts, .mk-body .card ul.hbars { padding-left: 0; margin: 0; }

/* ---------- v1.6.1: кнопка 🐞 виджета портала (левый нижний угол, 44 px) — только на стенде ---------- */
.has-bug .side-foot { padding-bottom: 60px; }
@media (max-width: 899px) {
  .has-bug .tabs { padding-left: 64px; }
  .has-bug .form-actions { padding-left: 60px; }
  .has-bug .toast { bottom: calc(72px + var(--tabs)); }
}
