:root {
  --bg: #0f172a;
  --panel: rgba(255, 255, 255, 0.95);
  --panel-solid: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

button,
input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 100dvh;
}

.map {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 34% 42%, rgba(37, 99, 235, 0.26), transparent 34%),
    linear-gradient(135deg, #1e293b, #0f172a);
}

.map--disabled::after {
  content: "Карта появится после добавления ключа Яндекс JavaScript API";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: white;
  font-size: 18px;
  background: rgba(15, 23, 42, 0.35);
}

.panel {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 18px;
  width: min(420px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.sheet-handle { display: none; }

.panel__header,
.selected-card__top,
.station-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.title-block { min-width: 0; }

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  margin-bottom: 3px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-button,
.map-action {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}

.icon-button:hover,
.map-action:hover { background: #eef2ff; }

.map-action {
  position: absolute;
  z-index: 4;
  right: 18px;
  top: 18px;
  display: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.summary-strip div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}

.summary-strip strong {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.summary-strip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.search-box {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.search-box span {
  color: var(--muted);
  font-size: 18px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.search-box input::placeholder {
  color: #9ca3af;
  font-weight: 600;
}

.quick-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.quick-filters::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: #374151;
  font-weight: 900;
  cursor: pointer;
}

.chip--active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.status-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
}

.muted {
  margin-bottom: 0;
  color: var(--muted);
}

.selected-card__address {
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.selected-card__fuels,
.station-item__fuels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.fuel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.fuel-badge--green { background: #dcfce7; color: #166534; }
.fuel-badge--yellow { background: #fef3c7; color: #92400e; }
.fuel-badge--red { background: #fee2e2; color: #991b1b; }

.primary-button {
  width: 100%;
  margin-top: 14px;
  min-height: 46px;
  border: 0;
  border-radius: 17px;
  background: var(--accent);
  color: white;
  font-weight: 900;
}

.primary-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.list-header span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.station-item {
  width: 100%;
  display: block;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.station-item:hover,
.station-item--selected {
  border-color: rgba(37, 99, 235, 0.58);
  background: var(--accent-soft);
}

.station-item:active { transform: scale(0.99); }

.station-item strong {
  display: block;
  font-size: 14px;
}

.station-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.freshness {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.station-item__address {
  display: block;
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 13px;
}


.service-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  padding: 10px 2px 6px;
  margin-top: 2px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.service-links a {
  color: #2563eb;
  text-decoration: none;
  white-space: nowrap;
}

.service-links a:hover { text-decoration: underline; }

.panel__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 999px;
}

.dot--green { background: var(--green); }
.dot--yellow { background: var(--yellow); }
.dot--red { background: var(--red); }

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.setup-notice {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
}

.setup-notice[hidden] {
  display: none !important;
}

.setup-notice__box {
  width: min(480px, 100%);
  padding: 22px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.setup-notice__box h2 { margin-bottom: 10px; }

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #be123c;
}

.balloon .fuel-badge { margin: 0 4px 4px 0; }

@media (max-width: 760px) {
  .desktop-only { display: none; }

  .map-action { display: block; }

  .panel {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-height: 58dvh;
    gap: 9px;
    padding: 8px 12px 12px;
    border-radius: 26px;
    transition: max-height 0.22s ease;
  }

  .panel--expanded {
    max-height: calc(100dvh - 22px);
  }

  .sheet-handle {
    width: 100%;
    height: 24px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
  }

  .sheet-handle span {
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: #cbd5e1;
  }

  .panel__header {
    align-items: center;
  }

  h1 { font-size: 22px; }
  h2 { font-size: 17px; }

  .subtitle { display: none; }

  .summary-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .summary-strip div {
    padding: 8px;
    border-radius: 16px;
  }

  .summary-strip strong { font-size: 17px; }
  .summary-strip span { font-size: 10px; }

  .search-box { min-height: 42px; border-radius: 16px; }

  .chip {
    min-height: 38px;
    padding: 0 13px;
  }

  .status-card {
    padding: 11px;
    border-radius: 18px;
  }

  .primary-button {
    min-height: 42px;
    margin-top: 11px;
  }

  .station-list {
    max-height: 190px;
  }

  .panel--expanded .station-list {
    max-height: 42dvh;
  }

  .station-item {
    padding: 11px;
    border-radius: 18px;
  }

  .panel__footer { display: none; }

  .ymaps-2-1-79-copyrights-pane {
    transform: scale(0.9);
    transform-origin: right bottom;
  }
}

@media (max-width: 430px) {
  .panel {
    max-height: 61dvh;
  }

  .panel--expanded {
    max-height: calc(100dvh - 16px);
  }

  .selected-card__top,
  .station-item__top {
    gap: 8px;
  }

  .status-pill,
  .freshness { font-size: 11px; }
  .fuel-badge { font-size: 11px; }

  .station-list { max-height: 170px; }
  .panel--expanded .station-list { max-height: 40dvh; }
}

/* Hotfix 2.1: keep filters visible on desktop and make only the list scroll. */
.panel__header,
.summary-strip,
.search-box,
.quick-filters,
.status-card,
.list-header,
.panel__footer {
  flex: 0 0 auto;
}

.station-list {
  min-height: 0;
  flex: 1 1 auto;
}

.quick-filters {
  min-height: 42px;
}

.selected-card__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.close-card-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: #64748b;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.close-card-button:hover {
  background: #fee2e2;
  color: #991b1b;
}

@media (min-width: 761px) {
  .panel {
    height: calc(100vh - 36px);
  }
}

/* Hotfix 2.2: mobile bottom sheet usability. */
@media (max-width: 760px) {
  .panel {
    max-height: 72dvh;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    touch-action: pan-y;
  }

  .panel--expanded {
    max-height: calc(100dvh - 74px);
  }

  .sheet-handle {
    height: 32px;
    margin: -4px 0 0;
  }

  .sheet-handle::after {
    content: "свайп вверх/вниз";
    margin-left: 8px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .panel__header {
    cursor: grab;
  }

  .summary-strip div {
    padding: 7px 8px;
  }

  .summary-strip strong {
    font-size: 16px;
  }

  .status-card {
    padding: 10px;
  }

  .selected-card__address {
    margin: 6px 0 8px;
    font-size: 13px;
  }

  .selected-card__top {
    align-items: center;
  }

  .status-card .primary-button {
    display: none;
  }

  .station-list {
    flex: 1 1 auto;
    max-height: none;
    min-height: 180px;
    padding-bottom: 120px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .panel--expanded .station-list {
    max-height: none;
    min-height: 280px;
  }
}

@media (max-width: 430px) {
  .panel {
    max-height: 74dvh;
  }

  .panel--expanded {
    max-height: calc(100dvh - 68px);
  }

  .station-list {
    min-height: 190px;
    padding-bottom: 140px;
  }

  .panel--expanded .station-list {
    min-height: 320px;
  }
}

/* Hotfix 2.3: real bottom-sheet amplitude. */
@media (max-width: 760px) {
  .panel {
    height: 62dvh !important;
    max-height: none !important;
    overflow: hidden;
    transition: height 0.24s ease, border-radius 0.24s ease;
  }

  .panel--collapsed {
    height: 118px !important;
  }

  .panel--mid {
    height: 62dvh !important;
  }

  .panel--expanded {
    height: calc(100dvh - 12px) !important;
    border-radius: 24px 24px 18px 18px;
  }

  .sheet-handle {
    height: 42px !important;
    min-height: 42px;
    flex: 0 0 auto;
    touch-action: none;
  }

  .sheet-handle::after {
    content: "свайп" !important;
  }

  .panel__header,
  .status-card,
  .summary-strip {
    touch-action: pan-y;
  }

  .panel--collapsed .summary-strip,
  .panel--collapsed .search-box,
  .panel--collapsed .quick-filters,
  .panel--collapsed .status-card,
  .panel--collapsed .list-header,
  .panel--collapsed .station-list,
  .panel--collapsed .panel__footer {
    display: none !important;
  }

  .panel--collapsed .panel__header {
    align-items: flex-start;
  }

  .panel--collapsed h1 {
    font-size: 21px;
  }

  .panel--collapsed .title-block::after {
    content: "Свайп вверх — открыть список заправок";
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
  }

  .station-list {
    min-height: 0 !important;
    max-height: none !important;
    flex: 1 1 auto;
    padding-bottom: 170px !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .panel--expanded .station-list {
    min-height: 0 !important;
    max-height: none !important;
  }
}

@media (max-width: 430px) {
  .panel--collapsed {
    height: 114px !important;
  }

  .panel--mid {
    height: 64dvh !important;
  }

  .panel--expanded {
    height: calc(100dvh - 10px) !important;
  }

  .station-list {
    padding-bottom: 190px !important;
  }
}

/* Stage 3: advanced filtering. */
.filter-card {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
}

.filter-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  background: #ffffff;
  color: #111827;
  font-weight: 900;
  cursor: pointer;
}

.filter-toggle strong {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 12px;
}

.filters-body {
  display: none;
  gap: 10px;
  padding: 0 12px 12px;
}

.filter-card--open .filters-body {
  display: grid;
}

.filter-group p,
.mini-field span {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.segmented-control {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented-control::-webkit-scrollbar { display: none; }

.segment {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.segment--active {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini-field {
  display: block;
}

.mini-field input,
.mini-field select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--text);
  font-weight: 800;
  outline: 0;
}

.reset-button {
  min-height: 38px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 760px) {
  .panel--collapsed .filter-card {
    display: none !important;
  }

  .filter-toggle {
    min-height: 40px;
  }

  .filters-body {
    gap: 9px;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .segment {
    min-height: 36px;
  }
}


/* Stage 3.1: fit all fuel buttons without horizontal clipping. */
.quick-filters {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  overflow: visible !important;
}

.chip {
  width: 100%;
  min-width: 0;
  padding: 0 6px;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 760px) {
  .quick-filters {
    gap: 7px;
  }

  .chip {
    min-height: 40px;
    padding: 0 4px;
    font-size: 13px;
  }

  .panel--collapsed .quick-filters {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .chip {
    font-size: 12px;
  }
}

/* Stage 4: update form and full mobile panel scrolling. */
.primary-button--active {
  opacity: 1 !important;
  cursor: pointer !important;
}

.secondary-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  color: #334155;
  font-weight: 900;
  cursor: pointer;
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 10px;
}

.meta-badges span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 900;
}

.modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal[hidden] {
  display: none !important;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(5px);
}

.modal__card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(780px, 92dvh);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.modal__header,
.modal__actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.update-form {
  display: grid;
  gap: 14px;
}

.fuel-form-rows {
  display: grid;
  gap: 10px;
}

.fuel-form-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.8fr) minmax(140px, 1fr) minmax(110px, 0.8fr);
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}

.fuel-form-row__name {
  font-weight: 1000;
}

.fuel-form-row label span,
.form-hint {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.fuel-form-row select,
.fuel-form-row input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--text);
  font-weight: 800;
  outline: 0;
}

.form-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
}

.modal__actions {
  align-items: center;
}

.modal__actions > button {
  flex: 1 1 0;
}

@media (max-width: 760px) {
  .panel {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .panel--collapsed {
    overflow: hidden !important;
  }

  .station-list {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 120px !important;
  }

  .panel--expanded .station-list,
  .panel--mid .station-list {
    min-height: 0 !important;
    max-height: none !important;
  }

  .status-card .primary-button {
    display: block !important;
  }

  .modal {
    align-items: end;
    padding: 8px;
  }

  .modal__card {
    width: 100%;
    max-height: calc(100dvh - 18px);
    border-radius: 26px 26px 18px 18px;
    padding: 14px;
  }

  .fuel-form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fuel-form-row__name {
    font-size: 16px;
  }
}

/* Stage 6: realtime sync indicator. */
.sync-status {
  flex: 0 0 auto;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.sync-status span {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #94a3b8;
}

.sync-status--online {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}

.sync-status--online span { background: #10b981; }

.sync-status--updated {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.sync-status--updated span { background: #3b82f6; }

.sync-status--polling {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.sync-status--polling span { background: #f97316; }

.sync-status--offline {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.sync-status--offline span { background: #ef4444; }

@media (max-width: 760px) {
  .panel--collapsed .sync-status {
    display: none !important;
  }

  .sync-status {
    min-height: 32px;
    font-size: 11px;
  }
}

/* Stage 7: spam protection and reports. */
.selected-card__buttons {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 8px;
  margin-top: 14px;
}

.selected-card__buttons .primary-button {
  margin-top: 0;
}

.report-button,
.danger-button {
  min-height: 46px;
  border: 1px solid #fecaca;
  border-radius: 17px;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 900;
  cursor: pointer;
}

.report-button:hover,
.danger-button:hover {
  background: #fee2e2;
}

.warning-card {
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
}

.modal__card--small {
  width: min(480px, 100%);
}

@media (max-width: 760px) {
  .selected-card__buttons {
    grid-template-columns: 1fr;
  }

  .report-button,
  .danger-button {
    min-height: 44px;
  }
}




.admin-mini-link {
  margin-left: auto;
  color: #2563eb;
  font-weight: 900;
  text-decoration: none;
}

.admin-mini-link:hover {
  text-decoration: underline;
}


@media (max-width: 760px) {
  .panel {
    padding-bottom: calc(28px + env(safe-area-inset-bottom)) !important;
    scroll-padding-bottom: 120px;
  }

  .panel--collapsed .service-links {
    display: none;
  }

  .service-links {
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
  }
}

/* Add station form: geocoder and map point picking. */
.header-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.pick-banner {
  position: absolute;
  z-index: 12;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: rgba(239, 246, 255, .96);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.pick-banner[hidden] {
  display: none !important;
}

.pick-banner button,
.geocoder-line button {
  min-height: 38px;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.pick-banner button {
  padding: 0 12px;
}

.geocoder-box {
  display: grid;
  gap: 10px;
}

.geocoder-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.geocoder-line input {
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--text);
  font-weight: 800;
  outline: 0;
}

.geocoder-line button {
  padding: 0 14px;
}

.geocoder-results {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
}

.geocoder-result {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
}

.geocoder-result strong,
.geocoder-result span {
  display: block;
}

.geocoder-result span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .header-actions {
    gap: 6px;
  }

  .pick-banner {
    top: 10px;
    font-size: 12px;
  }

  .geocoder-line {
    grid-template-columns: 1fr;
  }
}

/* Stage 11: pending station moderation warning. */
.warning-card + .warning-card {
  margin-top: -4px;
}

/* Stage 12: freshness and trust. */
.trust-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.trust-block strong,
.trust-block span {
  display: block;
}

.trust-block strong {
  font-size: 13px;
}

.trust-block span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trust-counters {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.trust-counters span {
  min-height: 26px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: white;
  color: #334155;
  font-weight: 900;
}

.trust-block--fresh { background: #ecfdf5; border-color: #bbf7d0; }
.trust-block--fresh strong { color: #166534; }
.trust-block--stale { background: #fffbeb; border-color: #fde68a; }
.trust-block--stale strong { color: #92400e; }
.trust-block--old,
.trust-block--expired { background: #f1f5f9; border-color: #cbd5e1; }
.trust-block--old strong,
.trust-block--expired strong { color: #475569; }
.trust-block--disputed { background: #fef2f2; border-color: #fecaca; }
.trust-block--disputed strong { color: #991b1b; }

.freshness-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.freshness-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f8fafc;
  color: #334155;
  font-weight: 900;
  cursor: pointer;
}

.freshness-actions button:first-child {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}

.freshness-actions button:last-child {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

@media (max-width: 430px) {
  .trust-block {
    align-items: flex-start;
    flex-direction: column;
  }

  .freshness-actions {
    grid-template-columns: 1fr;
  }
}
