:root{
  --bg:#f5f6f7;
  --card:#eee4d4;
  --text:#1b1f23;
  --muted:#6b7280;
  --border:#e5e7eb;
  --brand:#0B6E4F;
  --shadow: 0 8px 22px rgba(0,0,0,.06);
  --radius: 16px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
  background:var(--card);
  border-bottom:1px solid var(--border);
}

.brand{
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:700;
  color:var(--brand);
}

.topbar-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.role-badge{
  display:flex;
  gap:8px;
  align-items:center;
  font-size:14px;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
}

.layout{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:14px;
  padding:14px;
}

@media (max-width: 980px){
  .layout{ grid-template-columns:1fr; }
  .left{ order:2; }
  .right{ order:1; }
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  padding:14px;
}

.card-title{
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:700;
  margin-bottom:12px;
  color:#111827;
}

.filters{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.input{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  outline:none;
}

.input:focus{
  border-color: rgba(11,110,79,.5);
  box-shadow:0 0 0 4px rgba(11,110,79,.12);
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.chip{
  cursor:pointer;
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:8px 10px;
  font-size:12px;
}

.chip.active{
  border-color: rgba(11,110,79,.5);
  background: rgba(11,110,79,.08);
  color: var(--brand);
}

.list{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height: 55vh;
  overflow:auto;
  padding-right:6px;
}

.item{
  cursor:pointer;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  background:#fff;
  transition:.12s ease;
}

.item:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
}

.item-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.item-title span{
  font-weight:700;
}

.item-meta{
  margin-top:6px;
  color:var(--muted);
  font-size:12px;
  display:flex;
  justify-content:space-between;
}

.stats{
  display:flex;
  gap:12px;
  justify-content:space-between;
}

.stat-label{
  font-size:12px;
  color:var(--muted);
}

.stat-value{
  font-size:18px;
  font-weight:800;
}

.map-card{ padding:14px; }
.map{
  width:100%;
  height: calc(100vh - 160px);
  min-height: 520px;
  border-radius: 14px;
  overflow:hidden;
}

/* Buttons */
.btn{
  cursor:pointer;
  border:1px solid var(--border);
  background:#fff;
  border-radius:12px;
  padding:9px 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:600;
}

.btn--ghost{
  background:#fff;
}

.btn--primary{
  border-color: rgba(11,110,79,.4);
  background: var(--brand);
  color:#fff;
}

.btn--secondary{
  background:#fff;
}

.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* Side Panel */
.panel{
  position:fixed;
  top:0;
  right:-420px;
  width:380px;
  height:100vh;
  background:var(--card);
  border-left:1px solid var(--border);
  box-shadow: -10px 0 30px rgba(0,0,0,.08);
  transition: .18s ease;
  z-index:50;
  display:flex;
  flex-direction:column;
}

.panel.open{ right:0; }

.panel-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
}

.panel-title{
  font-weight:800;
}

.panel-body{
  padding:14px;
  overflow:auto;
}
.item.selected{
  border-color: rgba(11,110,79,.55);
  box-shadow: 0 10px 26px rgba(11,110,79,.10);
}

/* Forms */
.form-group{ margin-bottom:12px; }
.label{ font-size:12px; color:var(--muted); margin-bottom:6px; display:block; }
.select, .textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
}
.textarea{ resize:vertical; min-height:90px; }

.row{
  display:flex;
  gap:10px;
}
.row > *{ flex:1; }

/* Toast */
.toast{
  position:fixed;
  left:50%;
  bottom:22px;
  transform:translateX(-50%);
  background:#111827;
  color:#fff;
  padding:10px 12px;
  border-radius:999px;
  opacity:0;
  pointer-events:none;
  transition:.15s ease;
  font-size:13px;
}
.toast.active{ opacity:1; }


/* ===== Photo modal ===== */
.photo-modal{ position:fixed; inset:0; display:none; z-index:9999; }
.photo-modal.open{ display:block; }
.photo-modal__backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); }
.photo-modal__card{
  position:relative;
  width:min(92vw, 860px);
  max-height:90vh;
  margin:5vh auto;
  background:#fff;
  border-radius:16px;
  padding:12px;
  box-shadow:0 18px 60px rgba(0,0,0,.28);
  display:flex;
  align-items:center;
  justify-content:center;
}
.photo-modal__img{
  max-width:100%;
  max-height:calc(90vh - 48px);
  border-radius:12px;
  object-fit:contain;
  display:block;
}
.photo-modal__close{
  position:absolute;
  top:10px;
  right:10px;
  width:36px;height:36px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
  font-size:16px;
  line-height:1;
}


/* ===== Object details (panel) ===== */
.obj-head{ margin-bottom:10px; }
.obj-head__title{ font-weight:900; font-size:16px; line-height:1.15; }
.obj-head__badges{ margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; }
.obj-pill{ padding:4px 9px; border:1px solid var(--border); border-radius:999px; background:#fff; font-size:12px; opacity:.9; }

.obj-photo{ margin:12px 0; }
.obj-photo__img{
  width:100%;
  max-height:260px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.06);
  cursor:zoom-in;
}
.obj-photo__hint{ margin-top:6px; font-size:12px; opacity:.7; }
.obj-photo__empty{
  padding:18px;
  border-radius:14px;
  border:1px dashed rgba(0,0,0,.18);
  color:rgba(0,0,0,.55);
  background:rgba(0,0,0,.02);
  text-align:center;
  font-size:13px;
}

.kv{
  border:1px solid rgba(0,0,0,.07);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}
.kv__row{
  display:grid;
  grid-template-columns: 1fr 1.25fr;
  gap:10px;
  padding:10px 12px;
  border-top:1px solid rgba(0,0,0,.06);
}
.kv__row:first-child{ border-top:none; }
.kv__k{ color:rgba(0,0,0,.55); font-size:12.5px; }
.kv__v{ color:rgba(0,0,0,.88); font-size:13px; font-weight:600; }

.obj-desc{ margin-top:12px; }
.obj-desc__title{ font-weight:900; margin-bottom:6px; }
.obj-desc__text{ font-size:13px; line-height:1.35; color:rgba(0,0,0,.82); }


/* ===== Yandex Balloon (pretty) ===== */
.yb{
  max-width: 280px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.yb-title{
  font-weight: 900;
  font-size: 14px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.yb-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:10px;
}
.yb-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  font-size:12px;
  font-weight:700;
  color:rgba(0,0,0,.78);
}
.yb-grid{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.yb-row{
  display:flex;
  gap:6px;
  font-size:12.5px;
  line-height:1.25;
}
.yb-k{ color:rgba(0,0,0,.55); min-width:78px; }
.yb-v{ color:rgba(0,0,0,.85); font-weight:650; }
.yb-desc{
  margin-top:10px;
  font-size:12.5px;
  line-height:1.35;
  color:rgba(0,0,0,.82);
}
.yb-photo{
  margin-top:10px;
  width:100%;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  font-weight:800;
  cursor:pointer;
}
.yb-photo:hover{ filter:brightness(.98); }
.yb-resp{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(0,0,0,.08);
}
.yb-resp__k{ font-weight:900; font-size:12.5px; margin-bottom:4px; }
.yb-resp__v{ font-size:12.5px; color:rgba(0,0,0,.82); line-height:1.35; }


/* ===== Weather badge ===== */
.weather-badge{
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 60;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
  backdrop-filter: blur(6px);
  min-width: 140px;
  pointer-events: none; /* чтобы не мешало карте */
}

/* Вариант внутри левой панели (под фильтрами) */
.weather-badge.weather-badge--sidebar{
  position: static;
  left: auto;
  top: auto;
  z-index: auto;
  min-width: 0;
  width: 100%;
  margin: 10px 0 8px;
  pointer-events: auto;
}
.weather-badge__top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  opacity:.75;
}
.weather-badge__title{ font-weight:800; opacity:.85; }
.weather-badge__city{ opacity:.75; }
.weather-badge__main{
  margin-top:6px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.weather-badge__icon{ font-size:18px; }
.weather-badge__temp{ font-size:18px; font-weight:900; }
.weather-badge__meta{ margin-top:4px; font-size:12px; opacity:.7; }
