/* Manzara — общие токены и компоненты витрины и кабинета. Бумага, чернила, один акцент — цвет бренда. */
:root {
  --paper: #FAFAF7; --surface: #FFFFFF; --ink: #1B1F1D; --ink-2: #454D49; --muted: #76817B;
  --line: #DCE1DD; --line-strong: #B4BDB7; --tint: #F1F3EE;
  --accent: #0F6E63; --accent-ink: #0B534A; --accent-soft: #E2EFEB;
  --ok: #2E7D4F; --warn: #B0731A; --bad: #B23A2B;
  --display: "Piazzolla", Georgia, "Times New Roman", serif;
  --body: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}
[data-theme="dark"] {
  --paper: #121615; --surface: #191E1C; --ink: #ECEFEA; --ink-2: #C3CAC5; --muted: #8E9993;
  --line: #2A322E; --line-strong: #3E4944; --tint: #1A201E; --accent-soft: #16302B;
  --ok: #6CC08B; --warn: #D9A44A; --bad: #E0705F;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.disp { font-family: var(--display); font-variation-settings: "opsz" 30; font-weight: 500; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lab { font: 500 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; height: 44px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(27, 31, 29, .12); }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; font-weight: 600; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 600; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn-danger { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 40%, var(--line)); }
.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent); }
textarea.input { height: auto; padding: 10px 14px; resize: vertical; }
.seg { display: grid; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; height: 40px; background: var(--surface); }
.seg > button { border: 0; background: transparent; cursor: pointer; font-size: 13px; color: var(--ink); transition: background .15s; }
.seg > button.on { background: var(--ink); color: var(--paper); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.st-ok { background: var(--ok); } .st-far { background: var(--warn); } .st-none { background: var(--bad); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; cursor: pointer; transition: transform .15s, background .15s, color .15s; white-space: nowrap; }
.chip:hover { transform: translateY(-1px); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.row-hover { transition: background .15s; }
.row-hover:hover { background: var(--tint); }
.hint { color: var(--muted); font-size: 12.5px; }
.err { color: var(--bad); font-size: 13px; }
.skeleton { background: linear-gradient(90deg, var(--tint) 25%, var(--line) 50%, var(--tint) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.fade { animation: fade .7s cubic-bezier(.2, .8, .2, 1) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .28s; } .d4 { animation-delay: .38s; } .d5 { animation-delay: .48s; } .d6 { animation-delay: .58s; }
@keyframes fade { from { opacity: .35; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@property --n { syntax: "<integer>"; initial-value: 0; inherits: true; }
.count { animation: countup 1.4s cubic-bezier(.2, .8, .2, 1) .3s both; }
.count::after { counter-reset: n var(--n); content: counter(n); }
@keyframes countup { from { --n: 0; } }
.bar-fill { transform: scaleX(0); transform-origin: left; animation: grow 1.1s cubic-bezier(.2, .8, .2, 1) .4s forwards; }
@keyframes grow { to { transform: scaleX(1); } }
.gauge-arc { transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .2, 1); }
.lift { transition: box-shadow .25s ease, transform .25s ease; }
.lift:hover { box-shadow: 0 12px 30px rgba(27, 31, 29, .10); transform: translateY(-2px); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 10px; font-size: 14px; display: flex; gap: 14px; align-items: center; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); z-index: 60; animation: fade .3s ease-out both; }
.toast button { background: transparent; border: 0; color: #8ADBCC; font-weight: 600; cursor: pointer; }
.modal-bg { position: fixed; inset: 0; background: rgba(27, 31, 29, .55); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: min(560px, 100%); background: var(--surface); border-radius: 14px; padding: 28px 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); animation: modalin .35s cubic-bezier(.2, .9, .3, 1.2) both; max-height: 100%; overflow: auto; }
@keyframes modalin { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font: 500 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line-strong); }
table.t td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
table.t td.num, table.t th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.leaflet-container { background: var(--tint); font-family: var(--body); }
.leaflet-tile-pane { filter: grayscale(.9) brightness(1.05) contrast(.92) saturate(.8); }
[data-theme="dark"] .leaflet-tile-pane { filter: grayscale(1) invert(.92) brightness(.9) contrast(.9); }
.leaflet-control-attribution { font: 10px/1.4 var(--mono) !important; background: rgba(255, 255, 255, .8) !important; color: var(--muted) !important; }
/* Значки инфраструктуры на карте */
.mk { width: 24px; height: 24px; border-radius: 50%; background: var(--c, #64748b); color: #FFFFFF; display: flex; align-items: center; justify-content: center; border: 1.5px solid #FFFFFF; box-shadow: 0 2px 6px rgba(27, 31, 29, .28); transition: opacity .35s, transform .2s, box-shadow .2s; box-sizing: border-box; }
.mk svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mk.pop { animation: mkIn .5s cubic-bezier(.2, .9, .3, 1.25) both; }
.mk.dim { opacity: .08; pointer-events: none; }
.mk { transform: scale(var(--s, 1)); }
.mk.hi { transform: scale(calc(var(--s, 1) * 1.25)); box-shadow: 0 0 0 3px #FFFFFF, 0 4px 14px rgba(27, 31, 29, .35); z-index: 2; }
.mk.hi.st-far { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px var(--warn); } .mk.hi.st-none { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px var(--bad); }
.leaflet-marker-icon:hover .mk { transform: scale(calc(var(--s, 1) * 1.2)); } .leaflet-marker-icon:hover .mk.hi { transform: scale(calc(var(--s, 1) * 1.45)); }
.z-far .mk.dim { display: none; }
@keyframes mkIn { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
.ri { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ri svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.manzara-pin { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--ink); border: 2px solid #FFFFFF; transform: rotate(-45deg); box-shadow: 0 3px 10px rgba(27, 31, 29, .35); }
.manzara-pin::after { content: ""; position: absolute; left: 6px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #FFFFFF; }
.manzara-walker { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px #FFFFFF, 0 3px 10px rgba(27, 31, 29, .35); }
.manzara-target { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--accent); position: relative; }
.manzara-target::before { content: ""; position: absolute; inset: -2.5px; border-radius: 50%; border: 2.5px solid var(--accent); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.route-draw { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 1.2s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fade, .count, .bar-fill, .route-draw, .manzara-target::before, .skeleton, .modal { animation: none !important; opacity: 1; transform: none; stroke-dashoffset: 0; }
  .gauge-arc, .btn, .chip, .lift { transition: none; }
}
