/* =====================================================================
   Ecobay.by — доработки поверх темы:
   липкое меню, мобильное меню, кнопка «наверх», окно выбора города,
   плашка города, панель управления и страница входа.
   ===================================================================== */

/* Bootstrap включает scroll-behavior: smooth — он конфликтует с плавной прокруткой GSAP
   (каждый кадр анимации «догоняет» сам себя, и прокрутка к разделу обрывается). */
html {
  scroll-behavior: auto !important;
}

html.modal-open,
html.menu-open {
  overflow: hidden;
}

/* ---------- Липкое меню (нативная прокрутка) ---------- */
.starta-nav,
.transitionNav {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.starta-nav.sticky {
  position: fixed;
  top: 0 !important;
  left: 0;
  right: 0;
  z-index: 50;
  animation: navDrop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Кнопка «наверх» ---------- */
.backToTop {
  pointer-events: none;
  z-index: 40;
}
.backToTop.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (max-width: 768px) {
  .backToTop {
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
  }
}

/* ---------- Мобильное меню ---------- */
button.menuIcon {
  border: 0;
  padding: 0;
}
/* Крестик: в теме полоски поворачивались без сведения в центр и получалась «<».
   В закрытом состоянии позиционируем полоски абсолютно по центру кнопки. */
.menuIcon.close span {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
}
.menuIcon.close span:nth-child(1),
.menuIcon.close:hover span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}
.menuIcon.close span:nth-child(2),
.menuIcon.close:hover span:nth-child(2) {
  opacity: 0;
  transform: translate(-50%, -50%) scaleX(0);
}
.menuIcon.close span:nth-child(3),
.menuIcon.close:hover span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}
@media (max-width: 992px) {
  .menuIcon {
    position: fixed;
    z-index: 60;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  }
  .starta-nav.sticky ~ .menuIcon,
  .menuIcon.close {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  }
  .starta-mobile-nav {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 55;
    background-color: rgb(23, 23, 23);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.45s;
  }
  .starta-mobile-nav.menu-active {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
  }
  .starta-mobile-nav .starta-menu li {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
  .starta-mobile-nav.menu-active .starta-menu li {
    opacity: 1;
    transform: none;
  }
  .starta-mobile-nav.menu-active .starta-menu li:nth-child(1) { transition-delay: 0.10s; }
  .starta-mobile-nav.menu-active .starta-menu li:nth-child(2) { transition-delay: 0.15s; }
  .starta-mobile-nav.menu-active .starta-menu li:nth-child(3) { transition-delay: 0.20s; }
  .starta-mobile-nav.menu-active .starta-menu li:nth-child(4) { transition-delay: 0.25s; }
  .starta-mobile-nav.menu-active .starta-menu li:nth-child(5) { transition-delay: 0.30s; }
  .starta-mobile-nav.menu-active .starta-menu li:nth-child(6) { transition-delay: 0.35s; }
  .starta-mobile-nav.menu-active .starta-menu li:nth-child(7) { transition-delay: 0.40s; }

  .starta-mobile-nav .mobile-city-link {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
  }
}
@media (min-width: 993px) {
  .starta-mobile-nav { display: none !important; }
}

/* ---------- Пульс иконки телефона в меню ---------- */
.starta-helpline i {
  animation: phonePulse 2.4s infinite;
}

/* ---------- Плашка «Ваш город» на первом экране ---------- */
.hero-city-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
}
.hero-city-bar > i {
  color: var(--primary-color);
}
.hero-city-name {
  font-weight: 700;
}
.hero-city-change {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-color);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.hero-city-change:hover {
  color: #fff;
  background: rgb(60, 150, 64);
  transform: translateY(-1px);
}

/* ---------- Города на странице «Вся Беларусь» ---------- */
.hero-cities {
  margin-top: 26px;
  max-width: 720px;
}
.hero-cities-label {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hero-cities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-city-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--heading-color-3);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.hero-city-chip:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
}
.hero-cities-note {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}
@media (max-width: 767.98px) {
  .hero-city-bar { font-size: 14px; margin-bottom: 12px; }
  .hero-cities { margin-top: 18px; text-align: center; }
  .hero-cities-list { justify-content: center; }
}

/* ---------- Окно выбора города ---------- */
.city-modal-overlay,
.promo-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 14, 12, 0.62);
  backdrop-filter: blur(4px);
  animation: overlayIn 0.25s ease-out;
}
.promo-modal {
  animation: modalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.city-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 36px 32px 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  text-align: center;
  animation: modalIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.city-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgb(240, 242, 240);
  color: rgb(60, 60, 60);
  font-size: 18px;
  display: grid;
  place-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.city-modal-close:hover {
  background: rgb(225, 228, 225);
  transform: rotate(90deg);
}
.city-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: rgba(76, 175, 80, 0.12);
  color: var(--primary-color);
  font-size: 28px;
}
.city-modal-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--heading-color-3);
  margin-bottom: 8px;
}
.city-modal-text {
  color: rgb(90, 90, 90);
  font-size: 16px;
  margin-bottom: 20px;
}
.city-modal-search {
  position: relative;
  margin-bottom: 12px;
}
.city-modal-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgb(150, 150, 150);
}
.city-modal-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 42px;
  border-radius: 14px;
  border: 1px solid rgb(225, 225, 225);
  font-size: 16px;
  outline: none;
}
.city-modal-search input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18);
}
.city-modal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}
.city-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 2px solid rgb(232, 234, 232);
  background: #fff;
  color: var(--heading-color-3);
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}
.city-option:hover {
  border-color: rgba(76, 175, 80, 0.55);
  transform: translateY(-1px);
}
.city-option.selected {
  border-color: var(--primary-color);
  background: rgba(76, 175, 80, 0.08);
}
.city-option-radio {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgb(190, 195, 190);
  position: relative;
  transition: border-color 0.2s ease;
}
.city-option.selected .city-option-radio {
  border-color: var(--primary-color);
}
.city-option.selected .city-option-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--primary-color);
  animation: modalIn 0.2s ease-out;
}
.city-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.city-modal-empty {
  grid-column: 1 / -1;
  color: rgb(120, 120, 120);
  text-align: center;
  margin: 10px 0;
}
.city-modal-confirm {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.city-modal-confirm:disabled {
  background-color: rgb(200, 205, 200);
  cursor: not-allowed;
}
.city-modal-confirm:disabled .starta-button-hover {
  display: none;
}
.city-modal-other {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 8px;
  border: 0;
  background: none;
  color: rgb(90, 90, 90);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.city-modal-other:hover {
  color: var(--primary-color);
}
@media (max-width: 480px) {
  .city-modal { padding: 30px 18px 20px; border-radius: 20px; }
  .city-modal-title { font-size: 23px; }
  .city-option { font-size: 15px; min-height: 50px; padding: 8px 10px; gap: 8px; }
}

/* =====================================================================
   Панель управления
   ===================================================================== */
.admin-shell {
  min-height: 100vh;
  background: rgb(244, 246, 245);
  font-family: "Roboto", sans-serif;
  color: rgb(30, 30, 30);
}
.admin-topbar {
  background: rgb(23, 23, 23);
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-brand {
  display: inline-flex;
  align-items: center;
  font-size: 26px;
  font-weight: 900;
  color: #fff;
}
.admin-brand img { height: 32px; margin-right: 8px; }
.admin-brand span { color: var(--primary-color); }
.admin-brand small {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-user { color: rgba(255, 255, 255, 0.85); font-size: 15px; }
.admin-topbar .admin-link { color: rgba(255, 255, 255, 0.85); }
.admin-link {
  color: rgb(46, 125, 50);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.admin-link:hover { text-decoration: underline; color: var(--primary-color); }

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 6px;
  margin: 0 0 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.admin-tabs button {
  border: 0;
  background: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  color: rgb(80, 80, 80);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.admin-tabs button:hover { background: rgb(240, 243, 240); }
.admin-tabs button.active { background: var(--primary-color); color: #fff; }
.admin-tabs button i { margin-right: 6px; }

.admin-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  height: 100%;
}
.admin-card-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 16px;
  color: rgb(25, 25, 25);
}
.admin-stat {
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.admin-stat span { display: block; color: rgb(110, 110, 110); font-size: 14px; }
.admin-stat strong { display: block; font-size: 32px; font-weight: 900; color: rgb(25, 25, 25); }

.admin-label { display: block; font-size: 14px; font-weight: 600; color: rgb(70, 70, 70); margin-bottom: 4px; }
.admin-muted { color: rgb(120, 120, 120); font-size: 13px; }
.admin-shell .form-control { border-radius: 10px; }
.admin-shell .form-control:focus,
.admin-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18);
}
.admin-switch .form-check-input:checked,
.admin-shell .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  padding: 11px 20px;
  font-weight: 800;
  font-size: 15px;
  transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.admin-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.admin-btn:not(:disabled):active { transform: scale(0.98); }
.admin-btn-primary { background: var(--primary-color); color: #fff; }
.admin-btn-primary:not(:disabled):hover { background: rgb(60, 150, 64); }
.admin-btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; padding: 8px 16px; }
.admin-btn-ghost:hover { background: rgba(255, 255, 255, 0.22); }
.admin-btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }

.admin-city-list { list-style: none; padding: 0; margin: 0; }
.admin-city-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.admin-city-list li:hover { background: rgb(243, 246, 243); }
.admin-city-list li.selected { background: rgba(76, 175, 80, 0.12); }
.admin-city-list li small { display: block; color: rgb(130, 130, 130); font-size: 12px; }

.admin-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.admin-badge-on { background: rgba(76, 175, 80, 0.15); color: rgb(46, 125, 50); }
.admin-badge-off { background: rgb(238, 238, 238); color: rgb(110, 110, 110); }
.admin-badge-warn { background: rgba(255, 193, 7, 0.2); color: rgb(150, 105, 0); }

.admin-hint {
  background: #fff;
  border-left: 4px solid var(--primary-color);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: rgb(70, 70, 70);
}
.admin-hint i { color: var(--primary-color); margin-right: 6px; }

.admin-alert { border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.admin-alert-ok { background: rgba(76, 175, 80, 0.12); color: rgb(46, 125, 50); }
.admin-alert-error { background: rgba(220, 53, 69, 0.1); color: rgb(176, 42, 55); }
.admin-alert-warn { background: rgba(255, 193, 7, 0.18); color: rgb(120, 85, 0); }

.admin-status-ok { color: rgb(46, 125, 50); font-size: 14px; font-weight: 600; }
.admin-status-error { color: rgb(176, 42, 55); font-size: 14px; font-weight: 600; }

.admin-table th { font-size: 13px; color: rgb(110, 110, 110); font-weight: 700; text-transform: uppercase; }
.admin-row-edit td { background: rgb(248, 250, 248); }

/* ---------- Страница входа ---------- */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    linear-gradient(rgba(15, 20, 16, 0.78), rgba(15, 20, 16, 0.86)),
    url(../../images/hero/bg.jpg) center / cover no-repeat;
  font-family: "Roboto", sans-serif;
}
.admin-login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  animation: modalIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.admin-login-logo {
  display: inline-flex;
  align-items: center;
  font-size: 30px;
  font-weight: 900;
  color: rgb(20, 20, 21);
  margin-bottom: 18px;
}
.admin-login-logo img { height: 36px; margin-right: 8px; }
.admin-login-logo span { color: var(--primary-color); }
.admin-login-title { font-size: 24px; font-weight: 900; margin-bottom: 4px; color: rgb(20, 20, 21); }
.admin-login-sub { color: rgb(110, 110, 110); margin-bottom: 20px; }
.admin-input { height: 50px; border-radius: 12px; font-size: 16px; }
.admin-login .validation-message { color: rgb(176, 42, 55); font-size: 13px; margin-top: 4px; }
.admin-login .admin-alert { margin-bottom: 16px; }
.admin-login .admin-btn { height: 52px; font-size: 16px; }
.admin-login .form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); }
.admin-login-back {
  display: block;
  text-align: center;
  margin-top: 18px;
  color: rgb(110, 110, 110);
  font-size: 14px;
  text-decoration: none;
}
.admin-login-back:hover { color: var(--primary-color); }

/* Patch v2: phone is the primary CTA, ahead of city chips and decorative icons. */
.hero-primary-contact { margin-top: 24px; }
.hero-primary-contact .call-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  height: auto;
  padding: 16px 30px;
  margin: 0;
  font-size: clamp(22px, 2.1vw, 30px);
  font-weight: 900;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .18);
}
.hero-primary-contact > span {
  display: block;
  margin-top: 10px;
  max-width: 470px;
  color: rgba(255,255,255,.9);
  font-size: 14px;
}
.hero-coverage-note { color: #fff; font-size: 16px; max-width: 620px; }
.hero-cities-label { line-height: 1.5; color: #fff; }
.hero-cities-note { line-height: 1.5; color: rgba(255,255,255,.9); }
.city-local-section { background: #f4f7f4; }
.city-local-card { height: 100%; padding: 24px; background: #fff; border-radius: 16px; border-top: 3px solid var(--primary-color); }
.city-local-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.city-local-card p { white-space: pre-line; overflow-wrap: anywhere; margin: 0; line-height: 1.65; color: #4c554e; }
.admin-local-editor summary { cursor: pointer; font-weight: 700; color: #2e7d32; }

/* One coordinate system for play glyph and rotating SVG. No CircleType DOM measuring. */
.video-block .playBtn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  z-index: 2;
}
.video-block .playBtn > i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-45%, -50%);
  font-size: 27px;
}
.video-block svg#circle-text {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  overflow: visible;
  transform-origin: 50% 50%;
}
.video-block svg#circle-text text { fill: #fff; font-family: inherit; font-size: 14px; font-weight: 600; }
.video-block .playBtn:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }

/* Admin reporting: no chart CDN or canvas dependency. Values have text equivalents. */
.admin-shell { font-variant-numeric: tabular-nums; }
.admin-stat { height: 100%; }
.admin-stat small { display: block; line-height: 1.45; }
.admin-delta-up { color: #287a35; }
.admin-delta-down { color: #ad4c37; }
.admin-goal-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.admin-goal-summary span { display: block; color: #677168; font-size: 13px; }
.admin-goal-summary strong { display: block; font-size: 21px; margin-top: 5px; }
.admin-progress { height: 9px; border-radius: 9px; background: #e8eee9; overflow: hidden; }
.admin-progress > span { display: block; height: 100%; background: #4caf50; border-radius: inherit; }
.admin-city-chart { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; padding: 16px 0; }
.admin-donut {
  flex: 0 0 200px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  padding: 29px;
}
.admin-donut > div { display: flex; flex-direction: column; align-items: center; justify-content: center; background: white; border-radius: 50%; width: 100%; height: 100%; }
.admin-donut strong { font-size: 30px; line-height: 1.25; }
.admin-donut span { color: #69736c; font-size: 14px; }
.admin-chart-legend { list-style: none; padding: 0; margin: 0; flex: 1 1 180px; max-height: 280px; overflow-y: auto; }
.admin-chart-legend li { display: grid; grid-template-columns: 10px minmax(0,1fr) auto 48px; align-items: center; gap: 8px; padding: 7px 0; font-size: 14px; }
.admin-chart-legend small { text-align: right; color: #69736c; font-size: 12px; }
.admin-chart-dot { width: 9px; height: 9px; border-radius: 50%; }
.admin-request-message { min-width: 160px; max-width: 350px; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; }
@media (max-width: 767.98px) {
  .hero-primary-contact .call-button { width: 100%; font-size: clamp(22px, 6vw, 28px); min-height: 64px; }
  .hero-primary-contact > span { margin-inline: auto; }
  .admin-city-chart { justify-content: center; }
  .admin-chart-legend { flex-basis: 100%; }
  .admin-goal-summary { grid-template-columns: 1fr; }
  .admin-pagination > div { flex-wrap: wrap; }
}

/* =====================================================================
   v3: цена «МЫ ПЛАТИМ» на первом экране
   ===================================================================== */
.heroPayBadge {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 18px;
  row-gap: 6px;
  margin: 18px 0 22px;
  padding: 14px 22px 14px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-color, #2e7d32) 0%, #1f6b2a 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(31, 107, 42, 0.28);
  max-width: 100%;
}
.heroPayBadge-label {
  grid-row: span 2;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  opacity: 0.9;
  border-left: 2px solid rgba(255, 255, 255, 0.35);
  padding-left: 10px;
}
.heroPayBadge-value { display: flex; align-items: baseline; gap: 6px; line-height: 1; white-space: nowrap; }
.heroPayBadge-prefix { font-size: 22px; font-weight: 700; opacity: 0.9; }
.heroPayBadge-num { font-size: 64px; font-weight: 900; letter-spacing: -0.02em; }
.heroPayBadge-dash { font-size: 40px; font-weight: 700; opacity: 0.8; }
.heroPayBadge-unit { font-size: 15px; font-weight: 700; line-height: 1.1; margin-left: 4px; opacity: 0.95; }
.heroPayBadge-note { font-size: 14px; font-weight: 600; opacity: 0.92; }
.heroPayBadge-note i { margin-right: 6px; }

@media (max-width: 767.98px) {
  .heroPayBadge {
    display: grid;
    width: 100%;
    margin: 12px 0 18px;
    padding: 12px 16px 12px 12px;
    column-gap: 14px;
  }
  .heroPayBadge-num { font-size: 52px; }
  .heroPayBadge-dash { font-size: 32px; }
  .heroPayBadge-prefix { font-size: 19px; }
  .heroPayBadge-label { font-size: 12px; }
  .heroPayBadge-note { font-size: 13px; }
}

/* =====================================================================
   v3: отзывы и жалобы
   ===================================================================== */
.feedback-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 24px;
  text-align: center;
}
.feedback-cta .starta-button i { margin-right: 8px; }
.feedback-modal { max-width: 560px; text-align: left; }
.feedback-modal .city-modal-title, .feedback-modal .city-modal-text, .feedback-modal .city-modal-icon { text-align: center; }
.feedback-types { display: flex; gap: 6px; background: rgb(240, 243, 240); border-radius: 12px; padding: 4px; margin: 14px 0; }
.feedback-types button {
  flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 9px 6px;
  font-weight: 700; color: rgb(60, 60, 60); cursor: pointer;
}
.feedback-types button.active { background: #fff; color: var(--primary-color, #2e7d32); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); }
.feedback-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.feedback-field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; color: rgb(60, 60, 60); }
.feedback-field-wide { grid-column: 1 / -1; }
.feedback-field input, .feedback-field select, .feedback-field textarea {
  width: 100%; border: 1px solid rgb(215, 220, 215); border-radius: 10px; padding: 10px 12px;
  font-size: 16px; font-weight: 400; background: #fff; color: rgb(25, 25, 25);
}
.feedback-field textarea { resize: vertical; min-height: 110px; }
.feedback-field small { align-self: flex-end; font-weight: 400; color: rgb(130, 130, 130); }
.feedback-field input:focus, .feedback-field select:focus, .feedback-field textarea:focus { outline: 2px solid var(--primary-color, #2e7d32); border-color: transparent; }
.feedback-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; opacity: 0; }
.feedback-error { color: #c62828; font-weight: 600; margin-bottom: 10px; }
.feedback-modal .starta-button[disabled] { opacity: 0.6; pointer-events: none; }
@media (max-width: 575.98px) {
  .feedback-grid { grid-template-columns: 1fr; }
  .feedback-modal { max-height: calc(100vh - 24px); overflow-y: auto; }
}

/* =====================================================================
   v3: заявки — карточки, статусы, действия
   ===================================================================== */
.req-status-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.req-status-tabs button {
  border: 1px solid rgb(220, 225, 220); background: #fff; border-radius: 999px; padding: 7px 14px;
  font-weight: 700; font-size: 14px; color: rgb(60, 60, 60);
}
.req-status-tabs button.active { background: var(--primary-color, #2e7d32); border-color: transparent; color: #fff; }
.req-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.req-filters .form-select { width: auto; min-width: 180px; }

.req-list { display: grid; gap: 12px; }
.req-card {
  border: 1px solid rgb(230, 233, 230); border-left: 5px solid #9e9e9e; border-radius: 14px;
  padding: 14px 16px; background: #fff;
}
.req-card-new { border-left-color: #f9a825; }
.req-card-done { border-left-color: #2e7d32; }
.req-card-cancelled { border-left-color: #c62828; background: rgb(253, 248, 248); }
.req-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.req-card-city { font-weight: 800; }
.req-card-date { color: rgb(120, 120, 120); font-size: 13px; }
.req-status { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; border-radius: 6px; padding: 3px 8px; }
.req-status-new { background: #fff3cd; color: #8a6100; }
.req-status-done { background: #e3f3e4; color: #1f6b2a; }
.req-status-cancelled { background: #fde2e2; color: #a61b1b; }
.req-card-body { display: grid; gap: 6px; }
.req-card-client { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.req-card-phone { font-weight: 800; font-size: 17px; color: rgb(25, 25, 25); text-decoration: none; }
.req-card-line { color: rgb(70, 70, 70); }
.req-card-message, .req-card-text { white-space: pre-line; color: rgb(40, 40, 40); margin: 0 0 6px; }
.req-card-shot { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.req-card-result { background: rgb(244, 248, 244); border-radius: 10px; padding: 8px 12px; }
.req-card-comment { font-style: normal; color: rgb(80, 80, 80); }
.req-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.req-action-panel { margin-top: 10px; padding: 12px; border-radius: 12px; background: rgb(246, 248, 246); display: grid; gap: 8px; }
.req-history { margin-top: 8px; font-size: 13px; color: rgb(100, 100, 100); border-top: 1px dashed rgb(225, 225, 225); padding-top: 8px; }
.req-history ul { margin: 0; padding-left: 18px; }

.req-create { border: 2px solid rgba(46, 125, 50, 0.25); }
.req-dropzone {
  position: relative; border: 2px dashed rgb(190, 205, 190); border-radius: 14px; min-height: 150px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px;
  background: rgb(248, 250, 248); overflow: hidden;
}
.req-dropzone:hover { border-color: var(--primary-color, #2e7d32); }
.req-dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.req-dropzone-hint { display: grid; gap: 4px; color: rgb(90, 90, 90); }
.req-dropzone-hint i { font-size: 30px; color: var(--primary-color, #2e7d32); }
.req-dropzone img { max-width: 100%; max-height: 260px; border-radius: 8px; }
.req-phone-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.req-phone-chips button { border: 1px solid var(--primary-color, #2e7d32); background: #fff; color: var(--primary-color, #2e7d32); border-radius: 999px; padding: 4px 12px; font-weight: 700; }

@media (max-width: 575.98px) {
  .req-card { padding: 12px; }
  .req-card-actions .admin-btn { flex: 1 1 auto; }
  .req-filters .form-select { flex: 1 1 140px; min-width: 0; }
}

/* =====================================================================
   v3: города в панели — список + редактор
   ===================================================================== */
.city-admin { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.city-admin-list { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; height: auto; }
.city-admin-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.city-admin-item {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent;
  border-radius: 10px; padding: 9px 10px;
}
.city-admin-item:hover { background: rgb(243, 246, 243); }
.city-admin-items li.selected .city-admin-item { background: rgba(46, 125, 50, 0.1); }
.city-admin-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.city-admin-item-main small { color: rgb(120, 120, 120); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-content .city-admin-list.admin-card {
  position: static;
  width: 100%;
  height: auto;
  min-width: 0;
  max-width: 100%;
  max-height: none;
  overflow: visible;
}
.admin-content .city-admin-items,
.admin-content .city-admin-items > li { min-width: 0; max-width: 100%; }
.admin-content .city-admin-item {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 60px;
  padding: 8px;
}
.admin-content .city-admin-item-main { width: 100%; gap: 4px; }
.admin-content .city-admin-item-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  min-width: 0;
}
.admin-content .city-admin-item-heading > strong {
  flex: 1 1 120px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.admin-content .city-admin-item-heading .admin-badge {
  flex: 0 1 auto;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 2px 7px;
}
.admin-content .city-admin-item-main .city-admin-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
}
.city-admin-item-path { flex: 1 1 80px; min-width: 0; overflow-wrap: anywhere; }
.city-admin-item-fill { flex: none; white-space: nowrap; }
.city-admin-summary { font-size: 13px; line-height: 1.4; }
/* Request editor/action dialogs: top layer instead of expanding the page above a card. */
html.admin-request-dialog-open,
html.admin-request-dialog-open body { overflow: hidden; overscroll-behavior: none; }
.admin-request-dialog {
  box-sizing: border-box; position: fixed; inset: 0; margin: auto; border: 0;
  width: min(960px, calc(100vw - 32px)); max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px); padding: 0; border-radius: 16px;
  background: #fff; color: #222; overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 20px 70px rgba(0,0,0,.25);
}
.admin-request-dialog::backdrop { background: rgba(15,20,15,.6); }
.admin-request-dialog-content { min-width: 0; padding: 24px; }
dialog.admin-request-dialog .req-create.admin-card { padding: 0; box-shadow: none; height: auto; margin: 0 !important; }
.admin-request-dialog .row > *, .admin-request-dialog .req-create { min-width: 0; }
.admin-request-dialog .req-create-head { position: sticky; top: -24px; background: #fff; padding: 10px 0; z-index: 2; }
.admin-request-dialog .req-create-head h2 { min-width: 0; font-size: 20px; overflow-wrap: anywhere; }
.admin-request-dialog .req-create-head button { flex: none; min-height: 44px; }
.req-create-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 0; margin-top: 10px; }
.admin-request-dialog .req-create-actions { position: sticky; bottom: -24px; background: #fff; z-index: 1; border-top: 1px solid #e1e8e2; }
.admin-request-dialog .form-control, .admin-request-dialog .form-select { min-width: 0; max-width: 100%; min-height: 44px; }
.admin-request-dialog button, .req-call-control button { min-height: 44px; }
.req-call-control { display: grid; justify-items: start; gap: 4px; min-width: 0; max-width: 100%; }
.req-call-control button { white-space: normal; }
.req-call-time { display: block; font-size: 12px; line-height: 1.5; color: #4b6a53; overflow-wrap: anywhere; }
.req-table-contact { min-width: 150px; max-width: 240px; }
.req-weight-report { --analytics-muted: #596c5f; --analytics-border: #dde7df; --analytics-green: #348247; }
.req-weight-subtitle { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.req-weight-summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-size: 14px; }
@media (max-width: 767.98px) {
  .admin-request-dialog { top: 8px; bottom: auto; margin: 0 auto; width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(var(--request-dialog-height, 100dvh) - 16px); border-radius: 12px; }
  .admin-request-dialog-content { padding: 16px; }
  .admin-request-dialog .req-create-head { top: -16px; }
  .admin-request-dialog .req-create-actions { bottom: -16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .admin-request-dialog .req-create-head h2 { font-size: 18px; }
  .admin-request-dialog .form-control, .admin-request-dialog .form-select { font-size: 16px; }
  .admin-request-dialog .req-dropzone { min-height: 120px; }
  .req-create-actions > button { flex: 1 1 130px; }
  .admin-content .req-dashboard-table-wrap { overflow: visible; }
  .req-dashboard-table, .req-dashboard-table tbody { display: block; width: 100%; min-width: 0; }
  .req-dashboard-table thead { display: none; }
  .req-dashboard-table tbody { display: grid; gap: 12px; }
  .req-dashboard-table tr { display: block; border: 1px solid #dfe7df; border-radius: 12px; padding: 12px; min-width: 0; }
  .req-dashboard-table td { display: grid; grid-template-columns: minmax(75px, 30%) minmax(0, 1fr); gap: 10px; padding: 6px 0; border: 0; min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .req-dashboard-table td::before { content: attr(data-label); color: #657569; font-size: 12px; font-weight: 600; }
  .req-dashboard-table td[colspan] { display: block; }
  .req-dashboard-table td[colspan]::before { display: none; }
  .req-dashboard-table td > * { min-width: 0; max-width: 100%; }
  .req-dashboard-table .req-table-contact > * { grid-column: 2; }
  .req-dashboard-table .req-table-contact::before { grid-row: 1 / 4; }
}
.city-admin-chevron { color: rgb(170, 170, 170); display: none; }
.city-admin-editor .admin-card { height: auto; }
.city-admin-empty { text-align: center; color: rgb(120, 120, 120); padding: 50px 20px; }
.city-admin-empty i { font-size: 40px; margin-bottom: 10px; color: rgb(190, 205, 190); }
.city-admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.city-admin-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.city-admin-back { display: none; padding: 0; font-weight: 700; text-decoration: none; color: var(--primary-color, #2e7d32); }
.city-admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid rgb(228, 232, 228); margin-bottom: 16px; overflow-x: auto; }
.city-admin-tabs button {
  border: 0; background: transparent; padding: 10px 14px; font-weight: 700; color: rgb(100, 100, 100);
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.city-admin-tabs button.active { color: var(--primary-color, #2e7d32); border-bottom-color: var(--primary-color, #2e7d32); }
.city-admin-savebar {
  position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 18px -22px -22px; padding: 12px 22px; background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgb(228, 232, 228); border-radius: 0 0 16px 16px; z-index: 3;
}

@media (max-width: 991.98px) {
  .city-admin { grid-template-columns: 1fr; }
  .city-admin-list { position: static; max-height: none; }
  .city-admin-chevron { display: inline; }
  .city-admin.is-editing .city-admin-list { display: none; }
  .city-admin:not(.is-editing) .city-admin-editor { display: none; }
  .city-admin-back { display: inline-flex; gap: 6px; align-items: center; width: 100%; }
  .city-admin-savebar .admin-btn { width: 100%; }
}
.req-list > * { min-width: 0; }
.req-card { min-width: 0; overflow-wrap: anywhere; }
.req-card-shot { flex-direction: column; align-items: flex-start; }
.req-card-shot img { display: block; max-width: 100%; max-height: 220px; width: auto; height: auto; object-fit: contain; border-radius: 8px; border: 1px solid rgb(230, 233, 230); }
/* Плашка цены в стиле «стекла», как плашка выбора города */
.heroPayBadge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  box-shadow: 0 10px 30px rgba(10, 0, 40, 0.25);
}
.heroPayBadge-label { border-left-color: rgba(255, 255, 255, 0.3); color: #8fe594; }
.heroPayBadge-num { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15); }
.heroPayBadge-dash, .heroPayBadge-prefix { color: rgba(255, 255, 255, 0.85); }
.heroPayBadge-unit { color: rgba(255, 255, 255, 0.9); }
.heroPayBadge-note { color: rgba(255, 255, 255, 0.88); }
.heroPayBadge-note i { color: #8fe594; }
/* Запас снизу первого экрана: список городов не уходит под белую волну фона */
@media (min-width: 768px) {
  .starta-hero { padding-bottom: 110px; }
}
.city-admin-list.admin-card { padding: 18px 14px; }

/* =====================================================================
   v3.1: маршрутные листы
   ===================================================================== */
.route-day-switch { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.route-day-switch input[type=date] { max-width: 190px; }
.route-point-no {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary-color, #2e7d32); color: #fff;
  font-weight: 800; font-size: 14px;
}
.req-pickup { color: #8a4b00; font-weight: 700; font-size: 13px; }
.route-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.route-grid .admin-card { height: auto; }
.route-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.route-city-sep { font-weight: 800; color: var(--primary-color, #2e7d32); margin-top: 6px; }
.route-item, .route-pool-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgb(230, 233, 230); background: #fff;
}
.route-item-done { background: rgb(244, 250, 244); }
.route-item-done .route-point-no { background: #9e9e9e; }
.route-item-cancelled { background: rgb(253, 246, 246); opacity: 0.8; }
.route-item-cancelled .route-point-no { background: #c62828; }
.route-item-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.route-item-actions { display: flex; gap: 4px; flex: none; }
.route-pool-group { margin-bottom: 12px; }
.route-pool-head { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid rgb(235, 238, 235); margin-bottom: 6px; }
.route-pool-item { margin-bottom: 6px; align-items: center; }
.route-pool-item.is-today { border-color: rgba(46, 125, 50, 0.55); box-shadow: inset 3px 0 0 var(--primary-color, #2e7d32); }
@media (max-width: 991.98px) {
  .route-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .route-item { flex-wrap: wrap; }
  .route-item-actions { width: 100%; justify-content: flex-end; }
  .route-pool-item { flex-wrap: wrap; }
  .route-pool-item .admin-btn { width: 100%; }
  .route-day-switch input[type=date] { max-width: none; flex: 1; }
}
/* Печать маршрутного листа: только лист, без панели и списка свободных заявок */
@media print {
  .admin-topbar, .admin-tabs, .route-toolbar, .route-pool, .route-item-actions, .admin-alert { display: none !important; }
  .route-grid { display: block; }
  .admin-shell, .admin-card { box-shadow: none !important; background: #fff !important; }
  .route-item { break-inside: avoid; }
}

/* Прогресс цели: толще, с градиентом и бегущим бликом — анимация видна даже при малом проценте */
.starta-performance .bar, .bar { height: 12px; border-radius: 8px; overflow: hidden; position: relative; background-color: rgb(233, 236, 233); }
.bar .fill {
  position: relative; min-width: 12px; overflow: hidden;
  background: linear-gradient(90deg, var(--primary-color, #4caf50) 0%, #7fd683 100%);
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.45);
}
.bar .fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.65) 50%, transparent 75%);
  background-size: 250% 100%;
  animation: ecoBarShine 2.4s linear infinite;
}
@keyframes ecoBarShine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .bar .fill::after { animation: none; } }

/* Метка «когда забрать» в маршрутах */
.pickup-chip {
  flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 78px;
  padding: 4px 8px; border-radius: 8px; font-size: 12px; font-weight: 800; line-height: 1.2; text-align: center;
}
.pickup-day { background: #e3f3e4; color: #1f6b2a; }
.pickup-overdue { background: #fde2e2; color: #a61b1b; }
.pickup-later { background: #eef1f6; color: #3d4a5c; }
.pickup-none { background: #f3f3f3; color: #8a8a8a; font-weight: 600; }
.route-pool-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.route-pool-controls .form-select { width: auto; }
@media (max-width: 575.98px) {
  .route-pool-controls .form-select { flex: 1 1 100%; }
  .pickup-chip { min-width: 0; }
}
/* Плашка города над текстом и формой */
.hero-city-bar-top { margin-bottom: 14px; }
@media (min-width: 768px) { .hero-city-bar-top { margin-bottom: 22px; } }
/* Заполнение прогресса: старт с нуля, плавно до --p и остаётся там */
.bar .fill { width: 0; transition: width 2.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s; }
.bar.is-filled .fill { width: max(var(--p, 0%), 12px); }
@media (prefers-reduced-motion: reduce) { .bar .fill { transition: none; } }
/* Подписи панели: версия движка и копирайт */
.admin-engine {
  margin-left: 10px; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.75); border: 1px solid rgba(255, 255, 255, 0.25);
  vertical-align: middle; white-space: nowrap;
}
.admin-shell { display: flex; flex-direction: column; }
.admin-footer { margin-top: auto; padding: 18px 12px; text-align: center; font-size: 13px; color: rgb(120, 120, 120); }
.staff-login-link { color: inherit; opacity: 0.7; font-size: 13px; text-decoration: none; }
.staff-login-link:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 575.98px) { .admin-engine { display: none; } }
@media print { .admin-footer { display: none; } }

/* Окно заявки */
.req-modal-overlay {
  position: fixed; inset: 0; z-index: 1050; background: rgba(15, 20, 15, 0.55);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px; overflow-y: auto;
}
.req-modal {
  position: relative; width: 100%; max-width: 720px; background: #fff; border-radius: 16px; padding: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.req-modal .admin-card { box-shadow: none; padding: 0; }
.req-modal-close { position: absolute; top: 12px; right: 12px; border: 0; background: rgb(240, 243, 240); width: 34px; height: 34px; border-radius: 50%; z-index: 2; }
.req-modal-grid { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 12px 0 16px; }
.req-modal-grid dt { font-weight: 600; color: rgb(110, 110, 110); }
.req-modal-grid dd { margin: 0; overflow-wrap: anywhere; }
.route-item-main.is-clickable { cursor: pointer; border-radius: 8px; }
.route-item-main.is-clickable:hover strong { color: var(--primary-color, #2e7d32); text-decoration: underline; }
@media (max-width: 575.98px) {
  .req-modal-overlay { padding: 0; }
  .req-modal { border-radius: 0; min-height: 100%; padding: 18px 14px; }
  .req-modal-grid { grid-template-columns: 1fr; gap: 2px; }
  .req-modal-grid dd { margin-bottom: 8px; }
}

/* Mobile admin patch: scoped to the administrator panel. */
.admin-panel-shell { --admin-topbar-height: 64px; width: 100%; min-width: 0; max-width: 100%; }
.admin-panel-shell .admin-topbar { flex: none; height: var(--admin-topbar-height); padding: 0; width: 100%; max-width: 100%; }
.admin-topbar-inner { display: flex; align-items: center; flex-wrap: nowrap; gap: 16px; height: 100%; min-width: 0; }
.admin-panel-shell .admin-brand { flex: none; white-space: nowrap; line-height: 1; }
.admin-panel-shell .admin-brand:hover { color: #fff; }
.admin-panel-shell .admin-brand img { flex: none; width: 32px; height: 32px; object-fit: contain; }
.admin-topbar-actions { display: flex; align-items: center; gap: 16px; min-width: 0; margin-left: auto; }
.admin-topbar-actions > a, .admin-topbar-actions > form { flex: none; white-space: nowrap; }
.admin-topbar-actions .admin-user { min-width: 0; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-menu-toggle, .admin-current-section, .admin-navigation-account { display: none; }
.admin-content, .admin-content > *, .admin-content .row > *, .admin-content .admin-card,
.admin-content .city-admin > *, .admin-content .route-grid > * { min-width: 0; }
.admin-content .table-responsive { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.admin-content .admin-card-title, .admin-content .admin-hint, .admin-content .admin-alert,
.admin-content .admin-status-error, .admin-content .admin-status-ok { overflow-wrap: anywhere; }
.admin-content .form-control, .admin-content .form-select { min-width: 0; max-width: 100%; }
.admin-content .city-admin { grid-template-columns: 320px minmax(0, 1fr); }
.admin-content .city-admin-list { top: calc(var(--admin-topbar-height) + 12px); max-height: calc(100dvh - var(--admin-topbar-height) - 24px); }
.admin-footer-version { display: block; margin-bottom: 4px; font-size: 11px; }
.admin-panel-shell button:focus-visible, .admin-panel-shell a:focus-visible { outline: 3px solid #4caf50; outline-offset: 3px; }
@media (min-width: 992px) {
  .admin-navigation { min-width: 0; }
  .admin-navigation .admin-navigation-body { display: block; padding: 0; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .admin-panel-shell .admin-brand small { display: none; }
}
@media (max-width: 991.98px) {
  .admin-panel-shell { --admin-topbar-height: 56px; }
  .admin-topbar-inner { gap: 10px; }
  .admin-panel-shell .admin-brand { font-size: 22px; }
  .admin-panel-shell .admin-brand img { width: 27px; height: 27px; margin-right: 6px; }
  .admin-panel-shell .admin-brand small, .admin-topbar-actions { display: none; }
  .admin-current-section { display: block; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.75); font-size: 13px; text-align: right; }
  .admin-menu-toggle { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: transparent; color: #fff; }
  .admin-menu-toggle:hover { background: rgba(255,255,255,.1); }
  .admin-burger { display: grid; gap: 5px; width: 22px; }
  .admin-burger > span { display: block; height: 2px; background: currentColor; border-radius: 2px; }
  .admin-navigation { --bs-offcanvas-width: min(340px, calc(100vw - 32px)); background: #fff; color: #1e1e1e; }
  .admin-navigation-head { gap: 12px; padding: 16px; border-bottom: 1px solid #e7ebe7; }
  .admin-navigation-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
  .admin-navigation-head .btn-close { flex: none; width: 24px; height: 24px; padding: 10px; margin: -6px; }
  .admin-navigation .admin-navigation-body { display: flex; flex-direction: column; gap: 16px; padding: 12px 12px max(16px, env(safe-area-inset-bottom)); overflow-x: hidden; }
  .admin-navigation .admin-tabs { display: grid; flex: none; gap: 4px; padding: 0; margin: 0; box-shadow: none; border-radius: 0; }
  .admin-navigation .admin-tabs li { min-width: 0; }
  .admin-navigation .admin-tabs button { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 12px; text-align: left; font-size: 15px; }
  .admin-navigation .admin-tabs button i { flex: 0 0 24px; margin-right: 8px; text-align: center; }
  .admin-navigation-account { display: grid; gap: 12px; margin-top: auto; padding: 16px 4px 0; border-top: 1px solid #e7ebe7; }
  .admin-navigation-user { font-size: 14px; overflow-wrap: anywhere; }
  .admin-navigation-account .admin-link { display: flex; align-items: center; gap: 8px; min-height: 44px; }
  .admin-navigation-logout { width: 100%; min-height: 44px; background: #f0f3f0; color: #333; }
  .admin-content.my-4 { margin-top: 16px !important; margin-bottom: 16px !important; }
  .admin-content .city-admin { grid-template-columns: minmax(0, 1fr); }
  .admin-content .city-admin-list { position: static; max-height: none; }
}
@media (max-width: 575.98px) {
  .admin-content { padding-left: 12px; padding-right: 12px; }
  .admin-content .admin-card { padding: 16px; border-radius: 12px; }
  .admin-content .admin-card-title { font-size: 18px; }
  .admin-content .admin-stat { padding: 14px; }
  .admin-content .form-control, .admin-content .form-select { font-size: 16px; min-height: 44px; }
  .admin-content .admin-btn, .admin-content .btn:not(.btn-link) { min-height: 44px; white-space: normal; }
  .admin-content .req-status-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-content .req-status-tabs button { min-height: 44px; padding: 8px; }
  .admin-content .admin-pagination > div { width: 100%; min-width: 0; }
  .admin-content .admin-pagination button { min-height: 44px; }
  .admin-content .route-day-switch { flex-wrap: wrap; }
  .admin-content .route-day-switch input[type=date] { flex: 1 1 120px; width: 0; }
  .admin-content .city-admin-savebar { margin: 16px -16px -16px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .admin-content .city-admin-tabs { max-width: 100%; }
  .admin-content .city-admin-tabs button { padding: 10px; min-height: 44px; }
  .admin-content .route-item-main { flex-basis: 100%; }
  .admin-content .route-item-actions .btn { min-width: 44px; }
}
@media print {
  .admin-panel-shell .admin-topbar, .admin-navigation, .admin-panel-shell .admin-footer { display: none !important; }
}
