:root {
    --bg: #f3f6f5;
    --panel: #ffffff;
    --text: #16211f;
    --muted: #6b7a76;
    --border: #dce5e2;
    --primary: #0d8f61;
    --primary-dark: #08764f;
    --soft: #e9f8f1;
    --danger: #c73636;
    --warning: #b56a00;
    --shadow: 0 18px 45px rgba(23, 39, 34, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.button-secondary {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fbfa;
    color: #263733;
    font-size: 13px;
    font-weight: 800;
}

.button-secondary:hover {
    background: #eef6f3;
    color: var(--primary-dark);
}

.home-promo-card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 13px 42px 13px 14px;
    border: 1px solid rgba(13, 143, 97, 0.18);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(233, 248, 241, 0.96), rgba(255, 255, 255, 0.96));
    box-shadow: 0 8px 22px rgba(23, 39, 34, 0.08);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.home-promo-card[hidden] {
    display: none !important;
}

.home-promo-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.home-promo-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #587069;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    box-shadow: none;
}

.home-promo-close:hover {
    background: #fff;
    color: #173f35;
    transform: none;
}

.home-promo-copy {
    display: grid;
    gap: 3px;
}

.home-promo-copy strong {
    color: #173f35;
    font-size: 14px;
    line-height: 1.15;
}

.home-promo-copy span {
    color: #587069;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.home-promo-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.home-promo-telegram,
.home-install-btn {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
}

.home-promo-telegram {
    border: 1px solid rgba(13, 143, 97, 0.18);
    background: #fff;
    color: #0d6b4d;
}

.home-promo-telegram:hover {
    background: #f6fffb;
    color: #08764f;
}

.home-install-btn {
    width: 100%;
    background: #0d8f61;
    color: #fff;
}

.home-install-btn.is-loading {
    opacity: 0.72;
}


input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 11px 13px;
    background: #fff;
    color: var(--text);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 143, 97, 0.12);
}

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #2b3734;
    margin-bottom: 6px;
}

.app-shell {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: 430px minmax(0, 1fr);
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 100%;
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    padding: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
    border-right: 1px solid var(--border);
    overflow: auto;
    overscroll-behavior: contain;
    z-index: 5;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 28px;
    background: var(--soft);
    box-shadow: inset 0 0 0 1px rgba(13, 143, 97, 0.12);
}

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

.brand-block h1 {
    margin: 0 0 4px;
    font-size: 26px;
    line-height: 1.1;
}

.brand-block p,
.muted {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.notice,
.search-card,
.fuel-preference-card,
.station-panel,
.admin-card,
.alert {
    border-radius: 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 8px 26px rgba(23, 39, 34, 0.07);
}

.notice {
    padding: 14px 16px;
    color: #ffffff;
    background: #f18397;
    border-color: #ccece0;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.45;
}

.support-author-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(13, 143, 97, 0.14);
    border-radius: 18px;
    background: rgb(104 235 174 / 58%);
}
.small-text{
    font-size: 12px;
}

.support-author-card strong {
    display: block;
    margin-bottom: 3px;
    color: #263733;
    font-size: 13px;
    line-height: 1.2;
}

.support-author-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
}

.support-author-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid rgba(13, 143, 97, 0.22);
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(23, 39, 34, 0.06);
    transition: 0.16s ease;
}

.support-author-button:hover,
.support-author-button:focus-visible {
    border-color: rgba(13, 143, 97, 0.5);
    background: var(--soft);
    transform: translateY(-1px);
    outline: none;
}

.search-card {
    padding: 16px;
}

.fuel-preference-card {
    padding: 0;
}

.text-center{
    text-align: center;
}

.fuel-preference-accordion {
    display: block;
}

.fuel-preference-summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 16px 48px 16px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.fuel-preference-summary::-webkit-details-marker {
    display: none;
}

.fuel-preference-summary::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--primary-dark);
    border-bottom: 2px solid var(--primary-dark);
    transform: translateY(-65%) rotate(45deg);
    transition: 0.18s ease;
}

.fuel-preference-accordion[open] .fuel-preference-summary::after {
    transform: translateY(-35%) rotate(225deg);
}

.fuel-preference-summary:hover,
.fuel-preference-summary:focus-visible {
    background: #f8fbfa;
    outline: none;
}

.fuel-preference-summary-meta {
    flex: 0 0 auto;
    max-width: 145px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-preference-body {
    padding: 0 16px 16px;
    border-top: 1px solid rgba(220, 229, 226, 0.72);
}

.fuel-preference-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.fuel-preference-title {
    color: #2b3734;
    font-size: 13px;
    font-weight: 800;
}

.fuel-preference-body .fuel-preference-options {
    margin-top: 14px;
}

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

.fuel-preference-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fbfdfc;
    color: #24332f;
    cursor: pointer;
    user-select: none;
    transition: 0.16s ease;
}

.fuel-preference-chip:hover {
    border-color: rgba(13, 143, 97, 0.45);
    background: #f1faf6;
}

.fuel-preference-chip input {
    width: auto;
    margin: 0;
    accent-color: var(--primary);
}

.fuel-preference-chip:has(input:checked) {
    border-color: rgba(13, 143, 97, 0.75);
    background: var(--soft);
    box-shadow: inset 0 0 0 1px rgba(13, 143, 97, 0.12);
}

.fuel-preference-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.fuel-visibility-toggle {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 12px;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbfdfc;
    color: #24332f;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    user-select: none;
}

.fuel-visibility-toggle:hover {
    border-color: rgba(13, 143, 97, 0.45);
    background: #f1faf6;
}

.fuel-visibility-toggle input {
    flex: 0 0 auto;
    width: auto;
    margin: 2px 0 0;
    accent-color: var(--primary);
}

.station-panel {
    padding: 18px;
}

.station-panel.empty {
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 230px;
    color: var(--muted);
}

.station-panel.empty h2 {
    color: var(--text);
}

.station-title {
    margin-bottom: 4px;
    font-size: 23px;
}

.station-subtitle {
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 14px;
}

.map-wrap {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #eef3f1;
}

#map {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100% !important;
    min-height: 100%;
}

.map-status-legend {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 620;
    width: calc(100% - 20px);
    padding: 10px 12px;
    border: 1px solid rgba(220, 229, 226, 0.85);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 28px rgba(23, 39, 34, 0.13);
    color: #263733;
    pointer-events: none;
}

.map-status-legend-summary {
    display: none;
}

.map-status-legend-summary::-webkit-details-marker {
    display: none;
}

.map-status-legend-title {
    margin: 0;
    color: #42504c;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
}

.map-status-legend-toggle {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.map-status-legend[open] .map-status-legend-toggle {
    transform: rotate(225deg);
}

.map-status-legend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 6px 12px;
}

.map-status-legend-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #40514c;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
}

.map-status-legend-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 1000;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.map-status-legend-icon--available {
    background: #087647;
}

.map-status-legend-icon--unavailable {
    background: #b51f1f;
}

.map-status-legend-icon--queue {
    background: #a16207;
    font-size: 0;
}

.map-status-legend-icon--queue::before {
    content: "🚗";
    font-size: 10px;
    line-height: 1;
}

.map-status-legend-icon--stale {
    background: #747d7a;
    opacity: 0.68;
    filter: grayscale(1) saturate(0.35);
}

@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
    .map-status-legend {
        background: rgba(255, 255, 255, 0.72);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
}

.map-floating-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 600;
    box-shadow: var(--shadow);
}

.map-location-stack {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 650;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: min(230px, calc(100% - 36px));
    pointer-events: none;
}

.map-location-stack > * {
    pointer-events: auto;
}

.map-location-stack .map-floating-btn {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
}

.map-floating-btn.is-loading {
    opacity: 0.72;
    cursor: wait;
}

.map-floating-btn.is-location-active {
    box-shadow: 0 0 0 3px rgba(29, 140, 255, 0.22), var(--shadow);
}

.user-location-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
}

.user-location-marker-dot {
    width: 12px;
    height: 12px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: #1d8cff;
    box-shadow: 0 2px 10px rgba(29, 140, 255, 0.55);
}


.fuel-list {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.fuel-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    background: #fff;
}

.fuel-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.fuel-name {
    font-weight: 800;
    font-size: 16px;
}

.fuel-meta {
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 800;
    background: #eef2f1;
    color: var(--muted);
}

.status-badge.available {
    background: #e1f8eb;
    color: #077245;
}

.status-badge.unavailable {
    background: #ffe8e8;
    color: #b51f1f;
}

.status-badge.unknown {
    background: #fff4df;
    color: var(--warning);
}

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

.status-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.status-buttons label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 13px;
    cursor: pointer;
    background: #fafcfb;
}

.status-buttons input {
    width: auto;
}

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

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
    grid-template-columns: 0.75fr 1fr 0.5fr;
}

.history-block {
    margin-top: 18px;
}

.history-block h3 {
    margin-bottom: 10px;
}

.history-list {
    display: grid;
    gap: 9px;
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
}

.history-item {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 11px;
    background: #fbfdfc;
}

.history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.history-fuel {
    font-weight: 800;
}

.history-date {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.history-text {
    color: #40514d;
    font-size: 14px;
    line-height: 1.4;
}

.marker-popup-title {
    font-weight: 900;
    margin-bottom: 8px;
    color: #111827;
}

.marker-popup-address {
    margin-top: 8px;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.35;
}

.station-popup .leaflet-popup-content {
    width: 340px !important;
    max-width: min(360px, calc(100vw - 36px));
}

.marker-popup-title {
    padding-right: 18px;
    font-size: 14px;
    line-height: 1.25;
}

.marker-popup-fuels {
    display: grid;
    gap: 5px;
    min-width: 0;
    width: 100%;
    margin-top: 6px;
}

.marker-popup-fuels-title {
    margin-bottom: 2px;
    color: #374151;
    font-size: 12px;
    font-weight: 900;
}

.marker-popup-fuel-row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 5px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.marker-popup-fuel-row--available {
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.marker-popup-fuel-row--unavailable {
    background: #fff1f2;
    border-color: #fecdd3;
}

.marker-popup-fuel-row--unknown {
    background: #fffbeb;
    border-color: #fde68a;
}

.marker-popup-fuel-name {
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marker-popup-fuel-right {
    display: grid;
    grid-template-columns: minmax(0, 38px) 68px minmax(108px, 1fr);
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.marker-popup-fuel-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    max-width: 68px;
    border-radius: 999px;
    padding: 4px 6px;
    font-size: 10.5px;
    font-weight: 1000;
    line-height: 1;
    color: #374151;
    background: #e5e7eb;
    white-space: nowrap;
}

.marker-popup-fuel-status.available {
    color: #ffffff;
    background: #087647;
}

.marker-popup-fuel-status.unavailable {
    color: #ffffff;
    background: #b51f1f;
}

.marker-popup-fuel-status.unknown {
    color: #ffffff;
    background: #8a5200;
}

.marker-popup-fuel-price,
.marker-popup-fuel-date {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #6b7280;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marker-popup-fuel-price {
    color: #374151;
    text-align: right;
}

.marker-popup-fuel-date {
    overflow: visible;
    text-align: right;
    text-overflow: clip;
}

.marker-popup-fuel-right .marker-popup-fuel-status:first-child {
    grid-column: 2;
}

.marker-popup-fuel-right .marker-popup-fuel-status:first-child + .marker-popup-fuel-date {
    grid-column: 3;
}

.marker-popup-fuel-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.marker-popup-fuel-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 5px 8px;
    background: #f9fafb;
    color: #374151;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.marker-popup-fuel-badge--available {
    border-color: #bbf7d0;
    background: #60cf8e;
    color: #044328;
}

.marker-popup-fuel-badge--unavailable {
    border-color: #fecdd3;
    background: #f78088;
    color: #370101;
}

.marker-popup-fuel-badge--unknown {
    border-color: #fde68a;
    background: #fffbeb;
    color: #8a5200;
}

.marker-popup-fuel-badge--stale {
    opacity: 0.62;
}

.marker-popup-fuel-badge-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.marker-popup-fuel-badge-status,
.marker-popup-fuel-badge-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 3px 5px;
    background: rgba(255, 255, 255, 0.72);
    font-size: 10px;
    font-weight: 1000;
}

.marker-popup-fuel-badge-price {
    color: #111827;
}

/* Мобильная модалка поверх карты для информации по меткам */
.mobile-map-popup-backdrop {
    position: absolute;
    inset: 0;
    z-index: 2400;
    background: rgba(15, 23, 42, 0.36);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.mobile-map-popup-backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-map-popup-modal {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 14px;
    z-index: 2500;
    display: none;
    max-height: min(88vh, 620px);
    max-height: min(88dvh, 620px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 22px 22px 18px 18px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.34);
    transform: translateY(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.mobile-map-popup-modal.is-active {
    display: block;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-map-popup-modal::before {
    content: '';
    display: block;
    width: 42px;
    height: 4px;
    margin: 9px auto 0;
    border-radius: 999px;
    background: #d1d5db;
}

.mobile-map-popup-close {
    position: absolute;
    top: 9px;
    right: 10px;
    z-index: 2;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;

    font-size: 24px;
    font-weight: 700;
    line-height: 1;

    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;

    padding: 0;
}

.text-gray{
    color: #7d7d7d;
}

.mobile-map-popup-close:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.mobile-map-popup-content {
    max-height: min(78vh, 540px);
    max-height: min(78dvh, 540px);
    margin: 9px 12px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.mobile-map-popup-content .marker-popup-title,
.mobile-map-popup-content .company-popup-title {
    padding-right: 42px;
}

@supports ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    .mobile-map-popup-backdrop.is-active {
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }
}

@media (min-width: 981px) {
    .mobile-map-popup-backdrop,
    .mobile-map-popup-modal {
        display: none !important;
    }
}

@media (max-width: 980px) {
    .map-wrap--has-mobile-popup .leaflet-popup {
        display: none !important;
    }
}

@media (max-width: 980px) {
    .station-popup.leaflet-popup {
        margin-bottom: 12px;
    }

    .station-popup .leaflet-popup-content-wrapper {
        max-height: min(62vh, 380px);
        max-height: min(62dvh, 380px);
        overflow: hidden;
        border-radius: 16px;
    }

    .station-popup .leaflet-popup-content {
        width: calc(100vw - 36px) !important;
        max-width: 340px;
        max-height: min(56vh, 340px);
        max-height: min(56dvh, 340px);
        margin: 10px 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    .marker-popup-title {
        padding-right: 22px;
        font-size: 13px;
    }

    .marker-popup-fuels-title {
        font-size: 11px;
    }

    .marker-popup-fuel-row {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 6px;
        padding: 5px 6px;
    }

    .marker-popup-fuel-right {
        grid-template-columns: minmax(0, 38px) 68px minmax(108px, 1fr);
        gap: 4px;
    }

    .marker-popup-fuel-name,
    .marker-popup-fuel-price,
    .marker-popup-fuel-date {
        font-size: 10.5px;
    }

    .marker-popup-fuel-status {
        min-width: 68px;
        max-width: 68px;
        padding: 4px 6px;
        font-size: 10.5px;
    }

    .marker-popup-fuel-badges {
        gap: 5px;
    }

    .marker-popup-fuel-badge {
        padding: 5px 7px;
        font-size: 10.5px;
    }

    .marker-popup-fuel-badge-status,
    .marker-popup-fuel-badge-price {
        padding: 3px 5px;
        font-size: 9.5px;
    }

    .marker-popup-address,
    .marker-popup-status {
        font-size: 11px;
    }
}


@media (max-width: 360px) {
    .marker-popup-fuel-right {
        grid-template-columns: minmax(0, 1fr) 68px;
        row-gap: 3px;
    }

    .marker-popup-fuel-price {
        grid-column: 1;
        text-align: left;
    }

    .marker-popup-fuel-status {
        grid-column: 2;
    }

    .marker-popup-fuel-date,
    .marker-popup-fuel-right .marker-popup-fuel-status:first-child + .marker-popup-fuel-date {
        grid-column: 1 / -1;
        text-align: right;
    }

    .marker-popup-fuel-right .marker-popup-fuel-status:first-child {
        grid-column: 2;
    }
}

.marker-popup-fuel-empty {
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

.marker-popup-status {
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid #e5e7eb;
    color: #374151;
    font-size: 12px;
    font-weight: 800;
}

.admin-body {
    min-height: 100%;
    overflow: auto;
}

.admin-shell {
    width: min(1440px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 50px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-header h1 {
    margin-bottom: 4px;
}

.admin-exit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    background: #21322d;
    font-weight: 800;
}

.alert {
    padding: 14px 16px;
    margin-bottom: 14px;
    font-weight: 700;
}

.alert.success {
    background: #e9f9ef;
    color: #087647;
    border-color: #bfe9d0;
}

.alert.error {
    background: #fff0f0;
    color: #a51f1f;
    border-color: #f0c7c7;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
    gap: 18px;
    align-items: start;
}

.admin-card {
    padding: 18px;
    margin-bottom: 18px;
}

.login-card {
    width: min(440px, 100%);
    margin: 40px auto 0;
}

.login-card form,
.stacked-form {
    display: grid;
    gap: 11px;
}

.compact-form {
    margin-bottom: 16px;
}

#admin-map {
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 14px;
}

.fuel-admin-list {
    display: grid;
    gap: 8px;
}

.fuel-admin-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbfdfc;
}

.fuel-admin-row small {
    display: block;
    color: var(--muted);
}

.secondary-btn {
    background: #e9efed;
    color: #263632;
}

.secondary-btn:hover {
    background: #dce7e3;
}

.danger-btn {
    background: var(--danger);
}

.danger-btn:hover {
    background: #a92626;
}

.table-wrap {
    width: 100%;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1050px;
}

th,
td {
    border-bottom: 1px solid var(--border);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

td input[type="text"] {
    min-width: 135px;
}

td input[type="checkbox"] {
    width: auto;
    transform: scale(1.2);
}

.actions-cell {
    display: flex;
    gap: 8px;
}

.actions-cell form {
    margin: 0;
}

.actions-cell button {
    padding: 9px 12px;
    border-radius: 12px;
}

.leaflet-popup-content-wrapper {
    border-radius: 16px;
}

@media (max-width: 980px) {
    html,
    body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .app-shell {
        position: relative;
        inset: auto;
        grid-template-columns: 1fr;
        width: 100%;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
    }

    .sidebar {
        order: 2;
        height: auto;
        min-height: 0;
        max-height: none;
        border-right: 0;
        border-top: 1px solid var(--border);
        overflow: visible;
        overscroll-behavior: auto;
    }

    .map-wrap {
        order: 1;
        height: 73vh;
        height: 73dvh;
        min-height: 420px;
    }

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

@media (max-width: 620px) {
    .sidebar {
        padding: 5px;
    }


    .home-promo-card {
        border-radius: 16px;
        padding: 11px 38px 11px 12px;
    }

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

    .home-promo-telegram,
    .home-install-btn {
        min-height: 34px;
    }

    .brand-block {
        align-items: flex-start;
    }

    .brand-block h1 {
        font-size: 22px;
    }

    .form-grid.two,
    .form-grid.three,
    .status-buttons,
    .fuel-preference-options,
    .fuel-preference-actions {
        grid-template-columns: 1fr;
    }

    .fuel-preference-summary {
        padding: 14px 42px 14px 14px;
    }

    .hide-small{
        display: none;
    }

    .fuel-preference-summary-meta {
        max-width: 112px;
    }

    .map-status-legend {
        left: 12px;
        right: 12px;
        bottom: 5px;
        width: calc(100% - 20px);
        padding: 9px 10px;
        border-radius: 16px;
        pointer-events: auto;
    }

    .map-status-legend-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        list-style: none;
        color: #42504c;
        cursor: pointer;
        user-select: none;
    }

    .map-status-legend-summary:focus-visible {
        border-radius: 10px;
        outline: 3px solid rgba(13, 143, 97, 0.18);
        outline-offset: 4px;
    }

    .map-status-legend-title {
        font-size: 11px;
    }

    .map-status-legend:not([open]) .map-status-legend-grid {
        display: none;
    }

    .map-status-legend[open] .map-status-legend-grid {
        margin-top: 8px;
    }

    .map-status-legend-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .map-status-legend-item {
        font-size: 10.5px;
        line-height: 1.2;
    }

    .map-floating-btn {
        top: auto;
        right: 12px;
        bottom: 12px;
        font-size: 8px;
    }

    .map-location-stack {
        top: 12px;
        right: 12px;
        width: min(100px, calc(100% - 24px));
    }

    .map-location-stack .map-floating-btn {
        position: static;
        top: auto;
        right: auto;
        bottom: auto;
    }

    .admin-shell {
        width: min(100% - 18px, 1440px);
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .support-author-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .support-author-button {
        width: 100%;
    }
}

/* Логотипы АЗС внутри круглых маркеров Leaflet */
.station-marker-icon {
    background: transparent !important;
    border: 0 !important;
    z-index: 800 !important;
}

.station-marker-icon.leaflet-interactive:hover,
.station-marker-icon.leaflet-marker-icon:hover {
    z-index: 1400 !important;
}

.station-marker {
    --marker-status-color: var(--warning);
    --marker-fill-color: #fff7e6;
    --marker-symbol: '?';
    --marker-symbol-bg: #7c4a03;
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 4px solid rgba(255, 255, 255, 0.95);
    background-color: var(--marker-fill-color);
    box-shadow:
        0 0 0 3px var(--marker-status-color),
        0 10px 22px rgba(0, 0, 0, 0.24);
    overflow: visible;
    isolation: isolate;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.station-marker::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
}

.station-marker::after {
    content: var(--marker-symbol);
    position: absolute;
    right: -7px;
    top: -7px;
    z-index: 999;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 3px solid #fff;
    background: var(--marker-symbol-bg);
    color: #fff;
    font-size: 14px;
    font-weight: 1000;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.station-marker-icon:hover .station-marker {
    transform: scale(1.08);
    box-shadow:
        0 0 0 4px var(--marker-status-color),
        0 14px 28px rgba(0, 0, 0, 0.28);
}

.station-marker--available {
    --marker-status-color: #087647;
    --marker-fill-color: #dff7e9;
    --marker-symbol: '✓';
    --marker-symbol-bg: #087647;
}

.station-marker--unavailable {
    --marker-status-color: #b51f1f;
    --marker-fill-color: #ffe3e3;
    --marker-symbol: '×';
    --marker-symbol-bg: #b51f1f;
}

.station-marker--unavailable::before {
    background: repeating-linear-gradient(
        135deg,
        rgba(181, 31, 31, 0.2) 0,
        rgba(181, 31, 31, 0.2) 4px,
        transparent 4px,
        transparent 8px
    );
}

.station-marker--unknown {
    --marker-status-color: #8a5200;
    --marker-fill-color: #fff1d6;
    --marker-symbol: '?';
    --marker-symbol-bg: #8a5200;
}

.station-marker--unknown::before {
    background-image: radial-gradient(rgba(138, 82, 0, 0.28) 1.2px, transparent 1.2px);
    background-size: 7px 7px;
}


.station-marker--stale::after {
    background: #747d7a;
    opacity: 0.58;
    filter: grayscale(1) saturate(0.35);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.station-marker-icon:hover .station-marker--stale::after {
    opacity: 0.72;
}

.station-marker--preferred-fuel {
    box-shadow:
        0 0 0 3px var(--marker-status-color),
        0 0 0 7px rgba(255, 255, 255, 0.78),
        0 10px 22px rgba(0, 0, 0, 0.24);
}

.station-marker--preferred-fuel::after {
    width: 16px;
    height: 16px;
    font-size: 12px;
}

.station-marker-logo {
    position: relative;
    z-index: 2;
    object-fit: contain;
    display: block;
    border-radius: 999px;
    width: 42px !important;
    height: 42px  !important;;
    padding: 3px !important;
}

.station-marker-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #19302a;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    background: transparent;
}

/* Компании на карте */
.company-marker-icon {
    background: transparent !important;
    border: 0 !important;
    z-index: 900 !important;
}

.company-marker-icon.leaflet-interactive:hover,
.company-marker-icon.leaflet-marker-icon:hover {
    z-index: 1500 !important;
}

.company-marker {
    position: relative;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    background: #ffffff;
    box-shadow:
        0 0 0 3px rgba(33, 50, 45, 0.2),
        0 12px 24px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.company-marker:hover {
    transform: scale(1.08);
    box-shadow:
        0 0 0 4px rgba(13, 143, 97, 0.34),
        0 16px 30px rgba(0, 0, 0, 0.28);
}

.company-marker--admin {
    width: 40px;
    height: 40px;
    border-radius: 14px;
}

.company-marker-logo {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 5px;
    display: block;
    object-fit: contain;
    background: #ffffff;
}

.company-marker-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9f8f1 0%, #ffffff 100%);
    color: var(--primary-dark);
    font-size: 19px;
    font-weight: 1000;
    line-height: 1;
}

.company-popup {
    width: min(320px, 78vw);
}

.company-popup-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.company-popup-logo {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    padding: 5px;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    object-fit: contain;
    background: #ffffff;
}

.company-popup-title {
    color: #111827;
    font-size: 16px;
    font-weight: 1000;
    line-height: 1.2;
}

.company-popup-description {
    color: #273631;
    font-size: 13px;
    line-height: 1.45;
}

.company-popup-description p,
.company-popup-description ul,
.company-popup-description ol {
    margin: 0 0 8px;
}

.company-popup-description a {
    color: var(--primary-dark);
    font-weight: 900;
    text-decoration: none;
}

.company-popup-description a:hover {
    text-decoration: underline;
}

.company-popup-description img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.company-popup-empty {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.companies-table {
    min-width: 1250px;
}

.company-logo-cell {
    min-width: 260px;
}

.company-logo-preview {
    display: block;
    width: 46px;
    height: 46px;
    margin-top: 8px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 13px;
    object-fit: contain;
    background: #ffffff;
}

td textarea.html-description-textarea,
.html-description-textarea {
    min-width: 300px;
    min-height: 112px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.45;
}

.city-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(20, 120, 80, 0.12);
    box-shadow: 0 10px 30px rgba(12, 38, 28, 0.08);
    margin-bottom: 14px;
}

.city-card--compact {
    display: block;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(13, 143, 97, 0.18);
    box-shadow: 0 12px 32px rgba(12, 38, 28, 0.14);
    cursor: pointer;
    user-select: none;
    transition: 0.16s ease;
}

.city-card--compact:hover,
.city-card--compact:focus-visible {
    border-color: rgba(13, 143, 97, 0.48);
    background: #ffffff;
    transform: translateY(-1px);
    outline: none;
}

.city-card--compact label {
    margin-bottom: 2px;
    font-size: 10px;
}

.city-card--compact strong {
    font-size: 14px;
    line-height: 1.2;
}

.city-card--compact span {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.25;
}


.city-card label,
.city-modal label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5b7169;
    margin-bottom: 4px;
}

.city-card strong {
    display: block;
    font-size: 16px;
    color: #163f30;
}

.city-card span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #6b7d75;
}

.city-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 20, 16, 0.52);
    backdrop-filter: blur(8px);
}

.city-modal {
    width: min(440px, 100%);
    max-height: calc(100dvh - 40px);
    overflow: auto;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(20, 120, 80, 0.16);
}

.city-modal h2 {
    margin: 0 0 8px;
    color: #102e24;
    font-size: 26px;
}

.city-modal p {
    margin: 0 0 18px;
    color: #52665f;
    line-height: 1.5;
}

.city-combobox {
    position: relative;
}

.city-search-input {
    width: 100%;
    border: 1px solid #cfe0d9;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    color: #143b2e;
    background: #f8fbfa;
    outline: none;
}

.city-search-input:focus {
    border-color: #0d8f61;
    box-shadow: 0 0 0 3px rgba(13, 143, 97, 0.12);
}

.city-options-list {
    max-height: min(320px, 46vh);
    margin-top: 10px;
    overflow-y: auto;
    border: 1px solid #cfe0d9;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.city-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 0;
    background: #ffffff;
    color: #143b2e;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    box-shadow: none;
}

.city-option + .city-option {
    border-top: 1px solid #edf3f1;
}

.city-option:hover,
.city-option--selected {
    background: #e9f8f1;
    color: #08764f;
    transform: none;
}

.city-option small {
    flex: 0 0 auto;
    color: #6b7d75;
    font-size: 12px;
    font-weight: 700;
}

.city-options-empty {
    padding: 14px;
    color: #6b7d75;
    font-size: 14px;
    text-align: center;
}

.city-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.city-modal-actions button {
    flex: 1 1 160px;
}

.leaflet-marker-icon.marker-cluster {
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}

@media (max-width: 980px) {
    .city-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .city-card .button-secondary {
        width: 100%;
    }
}

.fuel-report-panel {
    margin-top: 18px;
}

.fuel-report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.fuel-report-head h3 {
    margin-bottom: 4px;
}

.fuel-bulk-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.bulk-report-form {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.fuel-bulk-actions .button-secondary,
.bulk-save-actions button {
    width: 100%;
}


.fuel-list--editable {
    gap: 10px;
    margin: 0;
    min-width: 0;
}

.fuel-edit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "info current"
        "statuses statuses"
        "price save";
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    transition: 0.18s ease;
    min-width: 0;
}

.fuel-edit-row--selected {
    border-color: rgba(13, 143, 97, 0.42);
    background: #f5fcf8;
}


.fuel-edit-info {
    grid-area: info;
    min-width: 0;
}

.fuel-edit-current {
    grid-area: current;
    display: flex;
    justify-content: flex-end;
}

.fuel-edit-statuses {
    grid-area: statuses;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.fuel-status-choice {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafcfb;
    color: #263733;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    user-select: none;
    transition: 0.18s ease;
}

.fuel-status-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.fuel-status-choice--checked {
    color: #fff;
    border-color: transparent;
}

.fuel-status-choice--available.fuel-status-choice--checked {
    background: #087647;
}

.fuel-status-choice--unavailable.fuel-status-choice--checked {
    background: #b51f1f;
}

.fuel-edit-price {
    grid-area: price;
    width: 100%;
    min-width: 0;
    min-height: 39px;
    padding: 9px 10px;
    border-radius: 12px;
}

.fuel-edit-price:disabled {
    color: var(--muted);
    background: #f3f6f5;
}

.save-one-fuel {
    grid-area: save;
    min-height: 39px;
    min-width: 0;
    padding: 9px 12px;
    white-space: normal;
}

.bulk-save-actions {
    display: grid;
    gap: 8px;
}

@media (max-width: 900px) {
    .fuel-bulk-actions {
        grid-template-columns: 1fr;
    }

    .fuel-edit-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "info"
            "current"
            "statuses"
            "price"
            "save";
        align-items: stretch;
    }

    .fuel-edit-current {
        justify-content: flex-start;
    }

    .save-one-fuel {
        width: 100%;
    }
	
	.save-one-fuel-mob{
		font-size: 11px;
	}
}

.seo-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 8px 26px rgba(23, 39, 34, 0.07);
}

.seo-card h2 {
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.2;
}

.seo-card p {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.seo-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.seo-card li + li {
    margin-top: 4px;
}

.geojson-import-card {
    border: 1px solid #cfe6db;
    background: #f6fffa;
}

.admin-checkbox-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 9px;
    font-weight: 700;
    color: #263632;
}

.admin-checkbox-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}


/* Лимит литров в одни руки */
.marker-popup-limit {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 8px;
    align-items: center;
    margin: 6px 0 8px;
    padding: 8px 9px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.marker-popup-limit-label {
    color: #6b7280;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.marker-popup-limit-value {
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-size: 12px;
    font-weight: 1000;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marker-popup-limit-hint,
.marker-popup-limit-date {
    grid-column: 1 / -1;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.marker-popup-limit--limited {
    background: #fff7ed;
    border-color: #fed7aa;
}

.marker-popup-limit--no-limit {
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.marker-popup-limit--stale {
    opacity: 0.72;
    filter: grayscale(0.35);
}

.fuel-limit-current {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 11px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.fuel-limit-current-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fuel-limit-current strong {
    min-width: 0;
    color: #111827;
    font-size: 15px;
    font-weight: 1000;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.fuel-limit-current span:last-child {
    min-width: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.fuel-limit-current--limited {
    border-color: #fed7aa;
    background: #fff7ed;
}

.fuel-limit-current--no-limit {
    border-color: #bbf7d0;
    background: #ecfdf3;
}

.fuel-limit-current--stale {
    opacity: 0.76;
    filter: grayscale(0.35);
}

.fuel-limit-report-panel {
    display: grid;
    grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.fuel-limit-report-controls {
    display: grid;
    grid-template-columns: minmax(110px, 0.8fr) minmax(92px, 0.65fr) minmax(110px, 0.8fr);
    gap: 8px;
    align-items: stretch;
}

.fuel-limit-choice {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fafcfb;
    color: #263733;
    font-size: 13px;
    font-weight: 1000;
    cursor: pointer;
    user-select: none;
    transition: 0.18s ease;
}

.fuel-limit-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.fuel-limit-choice--checked {
    color: #fff;
    border-color: transparent;
}

.fuel-limit-choice--limited.fuel-limit-choice--checked {
    background: #c2410c;
}

.fuel-limit-choice--no-limit.fuel-limit-choice--checked {
    background: #087647;
}

.fuel-limit-input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 13px;
}

.fuel-limit-input:disabled {
    color: var(--muted);
    background: #f3f6f5;
}

.fuel-limit-history-item {
    border-left: 4px solid #94a3b8;
}

.fuel-limit-history-item--limited {
    border-left-color: #c2410c;
}

.fuel-limit-history-item--no-limit {
    border-left-color: #087647;
}

.queue-visual {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.15;
    vertical-align: middle;
}

.queue-visual-icon {
    flex: 0 0 auto;
    width: 1.45em;
    height: 0.8em;
    color: currentColor;
}

.queue-visual-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.queue-visual-text {
    min-width: 0;
    white-space: nowrap;
    font-size: 10px;
}

.queue-visual--none {
    color: #0f9f53;
}

.queue-visual--small {
    color: #087647;
}

.queue-visual--medium {
    color: #a16207;
}

.queue-visual--large {
    color: #b91c1c;
}

.queue-visual--huge {
    color: #7f1d1d;
}

/* Очереди на АЗС */
.marker-popup-queue {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 8px;
    align-items: center;
    margin: 6px 0 8px;
    padding: 8px 9px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.marker-popup-queue-label {
    color: #6b7280;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.marker-popup-queue-value {
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-size: 12px;
    font-weight: 1000;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marker-popup-queue-visual {
    justify-content: flex-end;
    width: 100%;
}

.marker-popup-queue-hint,
.marker-popup-queue-date {
    grid-column: 1 / -1;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.marker-popup-queue--none {
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.marker-popup-queue--small {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.marker-popup-queue--medium {
    background: #fffbeb;
    border-color: #fde68a;
}

.marker-popup-queue--large {
    background: #fff1f2;
    border-color: #fecdd3;
}

.marker-popup-queue--stale {
    opacity: 0.68;
    filter: grayscale(0.5);
}

.station-marker-queue-badge {
    position: absolute;
    left: 50%;
    bottom: -12px;
    z-index: 1001;
    max-width: 54px;
    min-width: 26px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 6px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #475569;
    color: #fff;
    font-size: 9px;
    font-weight: 1000;
    line-height: 1;
    text-transform: uppercase;
    transform: translateX(-50%);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.station-marker-queue-badge::before {
    content: "🚗";
    font-size: 9px;
    line-height: 1;
}

.station-marker--queue-none .station-marker-queue-badge,
.station-marker--queue-small .station-marker-queue-badge {
    background: #087647;
}

.station-marker--queue-medium .station-marker-queue-badge {
    background: #a16207;
}

.station-marker--queue-large .station-marker-queue-badge {
    background: #b51f1f;
}

.queue-report-panel {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid rgba(13, 143, 97, 0.18);
    border-radius: 20px;
    background: linear-gradient(180deg, #fbfffd 0%, #f5fcf8 100%);
}

.queue-report-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    margin-bottom: 12px;
}

.queue-report-head h3 {
    margin: 0 0 5px;
    line-height: 1.15;
}

.queue-report-head .muted {
    max-width: 100%;
    line-height: 1.45;
}

.queue-current {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 11px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.queue-current-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.queue-current strong {
    min-width: 0;
    color: #111827;
    font-size: 15px;
    font-weight: 1000;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.queue-current-visual {
    font-size: 1.15em;
}

.queue-current span:last-child {
    min-width: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.queue-current--none,
.queue-current--small {
    border-color: #bbf7d0;
    background: #ecfdf3;
}

.queue-current--medium {
    border-color: #fde68a;
    background: #fffbeb;
}

.queue-current--large {
    border-color: #fecdd3;
    background: #fff1f2;
}

.queue-current--stale {
    opacity: 0.72;
    filter: grayscale(0.45);
}

.queue-report-form {
    display: grid;
    gap: 10px;
}

.queue-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
}

.queue-choice {
    position: relative;
    display: grid;
    align-content: start;
    gap: 4px;
    min-height: 68px;
    margin: 0;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    user-select: none;
    transition: 0.18s ease;
}

.queue-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.queue-choice-title {
    color: #1f2937;
    font-size: 13px;
    font-weight: 1000;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.queue-choice-visual {
    justify-content: center;
    width: 100%;
    font-size: 1.08em;
}

.queue-choice-hint {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.queue-choice--checked {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.queue-choice--checked .queue-choice-title,
.queue-choice--checked .queue-choice-hint,
.queue-choice--checked .queue-visual {
    color: #fff;
}

.queue-choice--none.queue-choice--checked,
.queue-choice--small.queue-choice--checked {
    background: #087647;
}

.queue-choice--medium.queue-choice--checked {
    background: #a16207;
}

.queue-choice--large.queue-choice--checked {
    background: #b51f1f;
}

.queue-report-form button[type="submit"] {
    width: 100%;
}

.history-queue-visual {
    font-size: 13px;
}

.queue-history-item {
    border-left: 5px solid #cbd5e1;
}

.queue-history-item--none,
.queue-history-item--small {
    border-left-color: #087647;
}

.queue-history-item--medium {
    border-left-color: #a16207;
}

.queue-history-item--large {
    border-left-color: #b51f1f;
}

.queue-history-item--huge {
    border-left-color: #7f1d1d;
}

@media (max-width: 980px) {
    .marker-popup-queue,
    .marker-popup-limit {
        padding: 7px 8px;
    }

    .marker-popup-queue-label,
    .marker-popup-queue-value,
    .marker-popup-queue-hint,
    .marker-popup-limit-label,
    .marker-popup-limit-value,
    .marker-popup-limit-hint
     {
        font-size: 10.5px;
    }

    .marker-popup-queue-date,
    .marker-popup-limit-date{
        font-size: 7px !important;
    }

    .queue-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 390px) {
    .queue-report-panel {
        padding: 12px;
    }

    .queue-choice-grid {
        gap: 7px;
    }

    .queue-choice {
        min-height: 66px;
        padding: 9px 8px;
    }
}

/* Кнопка отметки прямо в popup АЗС */
.marker-popup-actions {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.marker-popup-report-btn {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 1000;
}


.marker-popup-absence-btn,
.station-panel-absence-btn {
    width: 100%;
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid #fecaca;
    border-radius: 13px;
    background: #fff7f7;
    color: #991b1b;
    font-size: 13px;
    font-weight: 900;
}

.marker-popup-absence-btn:hover,
.marker-popup-absence-btn:focus-visible,
.station-panel-absence-btn:hover,
.station-panel-absence-btn:focus-visible {
    border-color: #ef4444;
    background: #fee2e2;
    color: #7f1d1d;
}

.station-panel-summary {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.station-panel-actions {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
}

.station-panel-actions button {
    width: 100%;
}

/* Модальное окно отметок поверх всей страницы, а не внутри контейнера карты */
body.station-report-modal-open {
    overflow: hidden;
    touch-action: none;
}

.station-report-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.station-report-modal-backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.station-report-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 20010;
    display: none;
    width: min(760px, calc(100vw - 28px));
    max-height: min(88vh, 780px);
    max-height: min(88dvh, 780px);
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.34);
    transform: translate(-50%, calc(-50% + 12px));
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.station-report-modal.is-active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.station-report-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 26px;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.station-report-modal-close:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.station-report-modal-content {
    width: 100%;
    max-height: min(88vh, 780px);
    max-height: min(88dvh, 780px);
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.station-report-loading {
    display: grid;
    gap: 6px;
    min-height: 150px;
    place-content: center;
    text-align: center;
}

.station-report-loading strong {
    font-size: 18px;
}

.station-report-loading span {
    color: var(--muted);
    font-size: 14px;
}

.station-report-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    margin: 0 46px 16px 0;
}

.station-report-head h3 {
    margin: 0 0 5px;
    color: #102e24;
    font-size: 23px;
    line-height: 1.12;
}

.station-report-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.station-report-head-statuses {
    display: grid;
    gap: 8px;
}

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

.station-report-section {
    display: grid;
    gap: 9px;
}

.station-report-section-title {
    color: #263733;
    font-size: 14px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.station-report-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.station-report-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.station-report-bulk-action {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 1000;
    white-space: nowrap;
}

.station-report-bulk-action--available:hover,
.station-report-bulk-action--available:focus-visible {
    color: #ffffff;
    border-color: #087647;
    background: #087647;
}

.station-report-bulk-action--unavailable:hover,
.station-report-bulk-action--unavailable:focus-visible {
    color: #ffffff;
    border-color: #b51f1f;
    background: #b51f1f;
}

.station-report-queue-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.station-report-queue-grid .queue-choice {
    min-height: 44px;
    padding: 10px 8px;
    text-align: center;
    justify-items: center;
}

.station-report-queue-grid .queue-choice-title {
    font-size: 16px;
}

.station-report-queue-grid .queue-choice-hint {
    display: none;
}

.station-report-fuel-list {
    gap: 8px;
}

.station-report-fuel-list .fuel-edit-row {
    grid-template-columns: minmax(92px, 0.86fr) minmax(112px, 0.8fr) minmax(82px, 0.42fr) minmax(98px, 0.48fr);
    grid-template-areas: "info statuses price save";
    padding: 10px;
    border-radius: 16px;
}

.station-report-fuel-list .fuel-edit-current,
.station-report-fuel-list .fuel-meta {
    display: none;
}

.station-report-fuel-list .fuel-name {
    font-size: 14px;
    line-height: 1.2;
}

.station-report-actions {
    position: sticky;
    bottom: -20px;
    display: grid;
    margin: 2px -20px -20px;
    padding: 12px 20px 16px;
    border-top: 1px solid rgba(220, 229, 226, 0.9);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
}

.station-report-save-all {
    min-height: 48px;
    font-size: 15px;
    font-weight: 1000;
    letter-spacing: 0.03em;
}


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

.station-absence-warning {
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 16px;
    background: #fffbeb;
    color: #7c2d12;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
}

.station-absence-reasons {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 10px;
}

.station-absence-reason {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 12px 46px;
    border: 1px solid #d9e2ec;
    border-radius: 16px;
    background: #fff;
    color: #263733;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.station-absence-reason:hover {
    border-color: #fca5a5;
    background: #fff7f7;
}

.station-absence-reason:focus-within {
    outline: 3px solid rgba(239, 68, 68, 0.16);
    outline-offset: 2px;
}

.station-absence-reason input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    pointer-events: none;
}

.station-absence-reason span {
    display: block;
    width: 100%;
}

.station-absence-reason::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    transform: translateY(-50%);
    box-sizing: border-box;
}

.station-absence-reason--checked {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.09);
}

.station-absence-reason--checked::after {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #ef4444;
    background: #ef4444;
    color: #fff;
    font-size: 14px;
    font-weight: 1000;
    line-height: 1;
}

.station-absence-comment-label {
    display: grid;
    gap: 7px;
    color: #263733;
    font-size: 14px;
    font-weight: 900;
}

.station-absence-comment-label textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    padding: 11px 12px;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    color: #0f172a;
    font: inherit;
    font-weight: 600;
    line-height: 1.45;
}

.station-absence-comment-label textarea:focus {
    outline: 3px solid rgba(239, 68, 68, 0.16);
    border-color: #ef4444;
}

.marker-popup-queue--huge,
.queue-current--huge {
    background: #fef2f2;
    border-color: #fca5a5;
}

.queue-choice--huge.queue-choice--checked {
    background: #7f1d1d;
}

.station-marker--queue-huge .station-marker-queue-badge {
    background: #7f1d1d;
}

.queue-history-item--huge {
    border-left-color: #7f1d1d;
}

@media (max-width: 980px) {
    .station-report-modal {
        inset: 0;
        width: auto;
        max-height: none;
        height: 100vh;
        height: 100dvh;
        border: 0;
        border-radius: 0;
        transform: translateY(14px);
    }

    .station-report-modal.is-active {
        transform: translateY(0);
    }

    .station-report-modal-content {
        flex: 1 1 auto;
        max-height: none;
        height: 100%;
        padding: max(18px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
    }

    .station-report-head {
        grid-template-columns: 1fr;
        margin: 0 42px 14px 0;
    }

    .fuel-limit-report-panel {
        grid-template-columns: 1fr;
    }

    .fuel-limit-report-controls {
        grid-template-columns: 1fr;
    }

    .station-report-head h3 {
        font-size: 20px;
    }

    .station-report-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .station-report-bulk-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
    }

    .station-report-bulk-action {
        width: 100%;
        min-height: 38px;
    }

    .station-report-queue-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px;
    }

    .station-report-queue-grid .queue-choice {
        min-height: 40px;
        padding: 8px 4px;
        border-radius: 12px;
    }

    .station-report-queue-grid .queue-choice-title {
        font-size: 13px;
    }

    .station-report-fuel-list .fuel-edit-row {
        grid-template-columns: minmax(74px, 0.7fr) minmax(106px, 1fr) minmax(70px, 0.48fr);
        grid-template-areas:
            "info statuses statuses"
            "price price save";
        gap: 7px;
    }

    .station-report-fuel-list .fuel-edit-statuses {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .station-report-fuel-list .fuel-status-choice {
        min-height: 36px;
        padding: 7px 8px;
        font-size: 12px;
    }

    .station-report-actions {
        bottom: -14px;
        margin: 2px -12px -14px;
        padding: 10px 12px 14px;
    }

    .station-absence-reasons {
        grid-template-columns: 1fr;
    }

    .station-absence-reason {
        justify-content: flex-start;
        min-height: 50px;
        padding: 11px 48px 11px 14px;
        text-align: left;
    }

    .station-absence-reason span {
        text-align: left;
    }

}

@media (max-width: 420px) {
    .station-report-queue-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .station-report-queue-grid .queue-choice-title {
        font-size: 12px;
    }

    .station-report-fuel-list .fuel-edit-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "info"
            "statuses"
            "price"
            "save";
    }

    .station-report-fuel-list .save-one-fuel {
        width: 100%;
    }
}

.station-report-section-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
}

.station-report-rare-fuels {
    display: grid;
    gap: 10px;
    margin-top: 4px;
    padding: 11px;
    border: 1px dashed rgba(148, 163, 184, 0.9);
    border-radius: 18px;
    background: #f8fafc;
}

.station-report-rare-fuels summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #263733;
    font-size: 13px;
    font-weight: 1000;
    cursor: pointer;
    list-style: none;
}

.station-report-rare-fuels summary::-webkit-details-marker {
    display: none;
}

.station-report-rare-fuels summary::after {
    content: '▾';
    color: var(--muted);
    font-size: 13px;
    transition: transform 0.18s ease;
}

.station-report-rare-fuels[open] summary::after {
    transform: rotate(180deg);
}

.station-report-rare-fuels summary small {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.station-report-rare-fuels-hint {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.station-report-fuel-list--rare {
    margin-top: 0;
}

.fuel-kind-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 10px;
    font-style: normal;
    font-weight: 1000;
    vertical-align: middle;
    white-space: nowrap;
}

.fuel-edit-row--untrusted {
    border-style: dashed;
    background: #ffffbf;
}

.history-item--untrusted {
    border-style: dashed;
    background: #ffffbf;
}

/* Многостраничная админка */
.admin-header--paged {
    align-items: flex-start;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 18px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.admin-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 13px;
    color: #1f332d;
    text-decoration: none;
    font-weight: 900;
    border: 1px solid transparent;
}

.admin-nav a:hover {
    background: #f2fbf6;
    border-color: #d6eee1;
}

.admin-nav a.active {
    background: #0d8f61;
    border-color: #0d8f61;
    color: #fff;
}

.admin-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    line-height: 1;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.admin-dashboard-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: #fff;
    color: #162720;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.admin-dashboard-card:hover {
    transform: translateY(-1px);
    border-color: #b7dec8;
}

.admin-dashboard-card span {
    font-weight: 900;
    color: #50645d;
}

.admin-dashboard-card strong {
    font-size: 38px;
    line-height: 1;
    color: #0d8f61;
}

.admin-dashboard-card small {
    color: var(--muted);
    font-weight: 800;
}

.admin-dashboard-card--warning strong {
    color: #b45309;
}

.admin-structure-card,
.admin-help-card {
    background: linear-gradient(180deg, #fff 0%, #f7fffb 100%);
}

.admin-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.admin-quick-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 13px;
    background: #0d8f61;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
}

.admin-grid--compact-page {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr);
}

.admin-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}

.admin-pagination a,
.admin-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid #d9e2ec;
    background: #fff;
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
}

.admin-pagination .active {
    border-color: #0d8f61;
    background: #0d8f61;
    color: #fff;
    font-weight: 700;
}

.admin-pagination .disabled {
    opacity: 0.45;
    pointer-events: none;
}

.admin-pagination-summary {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 14px;
}

.absence-moderation-card {
    border-color: #fed7aa;
    background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
}

.absence-table td {
    vertical-align: top;
}

.absence-station-title {
    font-weight: 900;
    color: #0f172a;
}

.absence-station-meta,
.absence-comment,
.absence-admin-comment {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}

.absence-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.absence-status--pending {
    background: #fef3c7;
    color: #92400e;
}

.absence-status--approved {
    background: #dcfce7;
    color: #166534;
}

.absence-status--rejected {
    background: #fee2e2;
    color: #991b1b;
}

.absence-actions {
    display: grid;
    gap: 7px;
    min-width: 190px;
}

.absence-actions input[type="text"] {
    min-width: 180px;
}

.absence-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.approve-btn {
    background: #0d8f61;
}

.reject-btn {
    background: #b91c1c;
}

@media (max-width: 980px) {
    .admin-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-grid--compact-page {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .admin-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-header--paged {
        align-items: stretch;
    }
}

/* Admin: station-specific supported fuels */
.station-fuels-cell {
    min-width: 260px;
    max-width: 360px;
}

.admin-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #173f35;
    cursor: pointer;
}

.admin-fuel-override-toggle {
    margin-bottom: 8px;
}

.admin-station-fuel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.admin-fuel-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border: 1px solid #d8e5df;
    border-radius: 12px;
    background: #f8fbfa;
    color: #1f332e;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
    cursor: pointer;
    user-select: none;
}

.admin-fuel-pill input,
.admin-inline-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #1f9d72;
    flex: 0 0 auto;
}

.admin-fuel-pill:has(input:checked) {
    border-color: #20a878;
    background: #e9fff6;
    color: #0e5a41;
}

.admin-fuel-override-hint {
    margin-top: 8px;
    color: #64746f;
    font-size: 12px;
    line-height: 1.35;
}

@media (max-width: 900px) {
    .admin-station-fuel-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin: stations map browser with clustering */
.admin-section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.admin-section-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 15px;
    border: 1px solid #d9e7e1;
    border-radius: 999px;
    background: #fff;
    color: #173f35;
    text-decoration: none;
    font-weight: 900;
}

.admin-section-tabs a.active {
    border-color: #0d8f61;
    background: #0d8f61;
    color: #fff;
}

.admin-card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-card-header-row h2 {
    margin-bottom: 4px;
}

.admin-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #d9e7e1;
    border-radius: 12px;
    background: #f8fbfa;
    color: #173f35;
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
}

.admin-map-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid #d9e7e1;
    border-radius: 18px;
    background: #f8fbfa;
}

.admin-map-filter-form label:not(.admin-inline-check) {
    display: grid;
    gap: 6px;
    min-width: min(360px, 100%);
    color: #173f35;
    font-weight: 800;
}

.admin-map-filter-form select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd8d2;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    padding: 8px 10px;
}

.admin-map-filter-form button {
    min-height: 42px;
    padding-inline: 18px;
}

.admin-map-filter-check {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #d9e7e1;
    border-radius: 12px;
    background: #fff;
}

.admin-stations-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: stretch;
}

.admin-stations-map-wrap {
    min-width: 0;
}

#admin-stations-map {
    width: 100%;
    min-height: 680px;
    border: 1px solid #d9e7e1;
    border-radius: 20px;
    overflow: hidden;
    background: #eef4f1;
}

.admin-station-marker-icon {
    background: transparent;
    border: 0;
}

.admin-station-marker {
    display: block;
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
}

.admin-station-marker.is-active {
    background: #0d8f61;
}

.admin-station-marker.is-inactive {
    background: #8c9995;
    opacity: 0.8;
}

.admin-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.admin-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-map-dot {
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.14);
}

.admin-map-dot--active {
    background: #0d8f61;
}

.admin-map-dot--inactive {
    background: #8c9995;
}

.admin-map-dot--cluster {
    background: #f59e0b;
}

.admin-stations-map-list {
    display: grid;
    align-content: start;
    gap: 8px;
    max-height: 720px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #d9e7e1;
    border-radius: 20px;
    background: #f8fbfa;
}

.admin-stations-map-list-head {
    position: sticky;
    top: -10px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px solid #e0ebe6;
    background: #f8fbfa;
    color: #173f35;
}

.admin-station-map-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px;
    border: 1px solid #dbe8e2;
    border-radius: 14px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.admin-station-map-item strong,
.admin-station-map-item span,
.admin-station-map-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-station-map-item strong {
    color: #0f172a;
    font-size: 14px;
}

.admin-station-map-item span {
    margin-top: 2px;
    color: #25614f;
    font-size: 13px;
    font-weight: 800;
}

.admin-station-map-item small {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
}

.admin-station-map-item.is-inactive {
    opacity: 0.72;
    background: #f3f6f5;
}

.admin-station-map-item.is-highlighted,
.admin-station-map-item:target {
    border-color: #0d8f61;
    box-shadow: 0 0 0 3px rgba(13, 143, 97, 0.16);
    transform: translateY(-1px);
}

.admin-station-map-focus {
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.admin-map-popup {
    min-width: 210px;
    color: #0f172a;
    line-height: 1.35;
}

.admin-map-popup-muted {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
}

.admin-map-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.admin-map-popup-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border-radius: 9px;
    background: #eaf7f2;
    color: #0d6b4d;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 1100px) {
    .admin-stations-map-layout {
        grid-template-columns: 1fr;
    }

    .admin-stations-map-list {
        max-height: 430px;
    }
}

@media (max-width: 620px) {
    .admin-card-header-row {
        display: grid;
    }

    .admin-map-filter-form {
        display: grid;
    }

    .admin-map-filter-form label:not(.admin-inline-check) {
        min-width: 0;
    }

    #admin-stations-map {
        min-height: 520px;
        border-radius: 16px;
    }

    .admin-station-map-item {
        grid-template-columns: 1fr;
    }
}

/* Admin: station editing directly from stations map */
.admin-stations-map-layout {
    grid-template-columns: minmax(0, 1fr) 430px;
}

.admin-stations-map-sidebar {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.admin-stations-map-sidebar .admin-stations-map-list {
    max-height: 390px;
}

.admin-map-station-editor[hidden] + .admin-stations-map-list {
    max-height: 720px;
}

.admin-map-station-editor {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #b9ded0;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f4fffa 100%);
    box-shadow: 0 14px 34px rgba(13, 143, 97, 0.12);
}

.admin-map-station-editor[hidden] {
    display: none !important;
}

.admin-map-station-editor-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.admin-map-station-editor-label {
    display: block;
    margin-bottom: 3px;
    color: #0d8f61;
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-map-station-editor-head strong {
    display: block;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.2;
}

.admin-map-station-editor-close {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid #d8e5df;
    border-radius: 999px;
    background: #fff;
    color: #173f35;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.admin-map-station-editor-meta {
    margin: 0;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
}

.admin-map-station-editor-form {
    gap: 8px;
}

.admin-map-station-editor-form label:not(.admin-inline-check),
.admin-map-station-editor-form .form-grid label {
    color: #173f35;
    font-size: 13px;
    font-weight: 900;
}

.admin-map-station-editor-form input[type="text"] {
    min-height: 39px;
}

.admin-map-station-editor-active {
    padding: 9px 10px;
    border: 1px solid #d9e7e1;
    border-radius: 12px;
    background: #fff;
}

.admin-map-editor-fuel-box {
    display: grid;
    gap: 8px;
    margin-top: 4px;
    padding: 12px;
    border: 1px solid #d9e7e1;
    border-radius: 16px;
    background: #ffffff;
}

.admin-station-fuel-grid--map-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-map-station-editor-delete {
    margin-top: -4px;
}

.admin-map-station-editor-delete .danger-btn {
    width: 100%;
}

.admin-station-map-item-actions {
    display: grid;
    gap: 6px;
    justify-items: stretch;
}

.admin-station-map-edit {
    padding: 7px 10px;
    border-radius: 10px;
    background: #eaf7f2;
    color: #0d6b4d;
    font-size: 13px;
}

.admin-station-map-item.is-selected {
    border-color: #0d8f61;
    background: #f1fff9;
}

.admin-map-popup-actions .admin-map-popup-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border: 0;
    border-radius: 9px;
    background: #0d8f61;
    color: #fff;
    text-decoration: none;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 1100px) {
    .admin-stations-map-layout {
        grid-template-columns: 1fr;
    }

    .admin-stations-map-sidebar .admin-stations-map-list,
    .admin-map-station-editor[hidden] + .admin-stations-map-list {
        max-height: 430px;
    }
}

@media (max-width: 620px) {
    .admin-station-map-item-actions {
        grid-template-columns: 1fr 1fr;
    }

    .admin-station-fuel-grid--map-editor {
        grid-template-columns: 1fr;
    }
}

/* Admin stations map: viewport-based lazy loading */
.admin-map-viewport-note {
    margin: -4px 0 14px;
    padding: 10px 12px;
    border: 1px solid #d9e7e1;
    border-radius: 14px;
    background: #f8fbfa;
    color: #426156;
    font-size: 13px;
    font-weight: 700;
}

.admin-map-viewport-note.is-warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

#admin-stations-map-list-body {
    display: grid;
    gap: 8px;
}
