.portal-messages {
    position: fixed;
    top: 84px;
    right: 24px;
    z-index: 3000;
    max-width: 360px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.portal-messages li {
    margin: 0 0 8px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #171A1F;
    border: 1px solid #2A2E34;
    border-left: 4px solid #FF6B00;
    color: #F2F3F5;
    list-style: none;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .4);
}

.portal-messages li.success {
    border-left-color: #34D399;
}

.portal-messages li.error {
    border-left-color: #F87171;
}

.portal-section {
    position: relative;
    z-index: 2;
    padding: 74px 0;
    background: #0B0C0E;
    border-top: 1px solid #1E2126;
    scroll-margin-top: 80px;
}

.portal-section--alt {
    background: #0E1014;
}

.portal-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.portal-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.portal-section__head h2 {
    margin: 0 0 6px;
    color: #FFFFFF;
    font-size: 2em;
    letter-spacing: -.01em;
}

.portal-section__head p {
    margin: 0;
    max-width: 720px;
    color: #A3A8B0;
    font-size: .95em;
}

.portal-location {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border: 1px solid #2A2E34;
    border-radius: 10px;
    background: #171A1F;
    color: #A3A8B0;
    font-size: .86em;
}

.portal-location__icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: #FF6B00;
}

.portal-location__button {
    flex: 0 0 auto;
    padding: 6px 12px;
    border: 1px solid #3A3F47;
    border-radius: 7px;
    background: transparent;
    color: #F2F3F5;
    font: inherit;
    cursor: pointer;
}

.portal-location__button:hover {
    border-color: #FF6B00;
    color: #FFFFFF;
}

.portal-location__button:disabled {
    opacity: .55;
    cursor: default;
}

.portal-location__button--ghost {
    border-color: transparent;
    color: #FFB27A;
}

.portal-location__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}

.portal-city-picker {
    margin: -4px 0 14px;
    padding: 14px;
    border: 1px solid #2A2E34;
    border-radius: 12px;
    background: #171A1F;
}

.portal-city-picker[hidden] {
    display: none;
}

.portal-city-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #F2F3F5;
}

.portal-city-picker__head b {
    font-size: .95em;
}

.portal-city-picker__close {
    padding: 0;
    border: 0;
    background: transparent;
    color: #A3A8B0;
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
}

.portal-city-picker__close:hover {
    color: #FFFFFF;
}

.portal-city-picker__hint {
    margin: 5px 0 10px;
    color: #A3A8B0;
    font-size: .8em;
}

.portal-city-picker__field {
    position: relative;
}

.portal-city-picker__field input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #3A3F47;
    border-radius: 8px;
    background: #101216;
    color: #F2F3F5;
    font: inherit;
    font-size: .95em;
}

.portal-city-picker__field input:focus {
    border-color: #FF6B00;
    outline: none;
}

.portal-city-picker__loading {
    position: absolute;
    top: 50%;
    right: 12px;
    color: #A3A8B0;
    font-size: .72em;
    transform: translateY(-50%);
}

.portal-city-picker__suggestions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 260px;
    margin-top: 8px;
    overflow-y: auto;
}

.portal-city-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #2A2E34;
    border-radius: 7px;
    background: #1B1E23;
    color: #F2F3F5;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.portal-city-option:hover,
.portal-city-option.is-active {
    border-color: #FF6B00;
    background: #22262C;
}

.portal-city-option b {
    font-weight: 600;
}

.portal-city-option span {
    overflow: hidden;
    color: #A3A8B0;
    font-size: .78em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-city-picker__empty {
    padding: 10px 2px;
    color: #A3A8B0;
    font-size: .82em;
}

.portal-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 16px;
    align-items: start;
}

.portal-map-canvas {
    position: relative;
    min-height: 520px;
    height: 62vh;
    border: 1px solid #2A2E34;
    border-radius: 14px;
    overflow: hidden;
    background: #141821;
}

.portal-map-canvas .leaflet-container {
    width: 100%;
    height: 100%;
    background: transparent;
}

.portal-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.portal-type-marker {
    background: transparent !important;
    border: none !important;
}

.portal-type-marker__badge {
    position: relative;
    box-sizing: border-box;
    display: flex;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 3px solid #000000;
    border-radius: 50%;
    background: #FFFFFF;
    color: #171A1F;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
    transition: transform .16s ease, box-shadow .16s ease;
}

.portal-type-marker:hover .portal-type-marker__badge,
.portal-type-marker:focus-within .portal-type-marker__badge {
    transform: scale(1.1);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
}

.portal-type-marker__svg {
    display: block;
    width: 31px;
    height: 31px;
}

.portal-type-marker__img {
    position: absolute;
    inset: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    border-radius: 50%;
    background: #FFFFFF;
    object-fit: contain;
}

.portal-user-marker {
    background: transparent !important;
    border: none !important;
}

.portal-user-marker__dot {
    box-sizing: border-box;
    display: block;
    width: 20px;
    height: 20px;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    background: #2F80ED;
    box-shadow: 0 0 0 6px rgba(47, 128, 237, .28), 0 4px 14px rgba(0, 0, 0, .45);
}

.portal-map-side {
    padding: 14px;
    background: #171A1F;
    border: 1px solid #2A2E34;
    border-radius: 12px;
}

.portal-map-side h3 {
    margin: 0 0 10px;
    color: #FFFFFF;
    font-size: .9em;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.portal-map-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 520px;
    overflow-y: auto;
}

.portal-map-item {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 8px;
    border: 1px solid #2A2E34;
    border-radius: 9px;
    background: #1B1E23;
    color: #F2F3F5;
    text-decoration: none;
    cursor: pointer;
}

.portal-map-item:hover {
    border-color: rgba(255, 107, 0, .55);
}

.portal-map-item img {
    width: 48px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.portal-map-item b,
.portal-map-item span {
    display: block;
}

.portal-map-item span {
    color: #A3A8B0;
    font-size: .78em;
}

.portal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 14px;
    color: #A3A8B0;
    font-size: .82em;
}

.portal-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.portal-dot--free { background: #27AE60; }
.portal-dot--busy { background: #F59E0B; }
.portal-dot--service { background: #E5484D; }

.portal-units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.portal-unit-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #171A1F;
    border: 1px solid #2A2E34;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
    transition: transform .25s ease, border-color .25s ease;
}

.portal-unit-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 107, 0, .55);
}

.portal-unit-card__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #0E1014;
}

.portal-unit-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.portal-unit-card h3 {
    margin: 0;
    color: #FFFFFF;
    font-size: 1.05em;
}

.portal-unit-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: #A3A8B0;
    font-size: .8em;
}

.portal-unit-card__price {
    color: #FF6B00;
    font-weight: 800;
}

.portal-unit-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.portal-tag {
    padding: 3px 7px;
    border-radius: 5px;
    background: #1B1E23;
    border: 1px solid #2A2E34;
    color: #A3A8B0;
    font-size: .72em;
}

.portal-tag--distance {
    border-color: rgba(255, 107, 0, .45);
    color: #FFB27A;
}

.portal-unit-card__actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.portal-unit-card__actions .btn {
    flex: 1;
    text-align: center;
    padding: 9px 10px;
}

.portal-rating {
    color: #FBBF24;
    letter-spacing: .08em;
}

.portal-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.portal-step {
    padding: 20px;
    background: #171A1F;
    border: 1px solid #2A2E34;
    border-radius: 14px;
}

.portal-step b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #FF6B00;
    color: #FFFFFF;
}

.portal-step h3 {
    margin: 0 0 6px;
    color: #FFFFFF;
    font-size: 1.05em;
}

.portal-step p {
    margin: 0;
    color: #A3A8B0;
    font-size: .88em;
}

.portal-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.portal-news-card {
    padding: 20px;
    background: #171A1F;
    border: 1px solid #2A2E34;
    border-radius: 14px;
}

.portal-news-card date {
    display: block;
    margin-bottom: 8px;
    color: #FF6B00;
    font-size: .75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.portal-news-card h3 {
    margin: 0 0 8px;
    color: #FFFFFF;
    font-size: 1.05em;
}

.portal-news-card p {
    margin: 0;
    color: #A3A8B0;
    font-size: .86em;
}

.portal-about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.portal-about h2 {
    margin: 0 0 12px;
    color: #FFFFFF;
    font-size: 1.8em;
}

.portal-about p {
    color: #A3A8B0;
    line-height: 1.6;
}

.portal-about__stats {
    display: grid;
    gap: 12px;
}

.portal-about__stats div {
    padding: 16px;
    background: #171A1F;
    border: 1px solid #2A2E34;
    border-left: 3px solid #FF6B00;
    border-radius: 12px;
}

.portal-about__stats b {
    display: block;
    color: #FFFFFF;
    font-size: 1.5em;
}

.portal-about__stats span {
    color: #A3A8B0;
    font-size: .82em;
}

.portal-contacts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 28px;
    align-items: center;
}

.portal-contacts h2 {
    margin: 0 0 10px;
    color: #FFFFFF;
    font-size: 1.8em;
}

.portal-contacts p {
    margin: 0;
    color: #A3A8B0;
}

.portal-contacts__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.portal-contacts__grid a,
.portal-contacts__grid div {
    display: block;
    padding: 14px 16px;
    background: #171A1F;
    border: 1px solid #2A2E34;
    border-radius: 12px;
    text-decoration: none;
}

.portal-contacts__grid a:hover {
    border-color: rgba(255, 107, 0, .55);
}

.portal-contacts__grid b {
    display: block;
    color: #FF6B00;
    font-size: .78em;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 4px;
}

.portal-contacts__grid span {
    color: #F2F3F5;
    font-weight: 600;
}

.portal-order-modal {
    max-width: 560px;
    width: 92vw;
}

.portal-order-unit {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #FFF4EA;
    border: 1px solid #FFD5B5;
    border-radius: 9px;
    color: #121317;
    font-weight: 700;
}

body.dark-theme .portal-order-unit {
    background: rgba(255, 107, 0, .12);
    border-color: rgba(255, 107, 0, .35);
    color: #FFFFFF;
}

.portal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-bottom: 12px;
    color: #5E646D;
    font-size: .82em;
    font-weight: 700;
}

.portal-field--full {
    width: 100%;
}

.portal-field input,
.portal-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E4E6EA;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.portal-field input:focus,
.portal-field textarea:focus {
    outline: none;
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, .16);
}

.portal-order-submit {
    width: 100%;
    margin-top: 4px;
}

.portal-popup {
    min-width: 220px;
    color: #121317;
    font-size: .84em;
}

.portal-popup img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.portal-popup h4 {
    margin: 0 0 5px;
    font-size: 1em;
}

.portal-popup p {
    margin: 3px 0;
    color: #5E646D;
}

.portal-popup .btn {
    width: 100%;
    margin-top: 8px;
    padding: 7px 10px;
    text-align: center;
}

.portal-empty {
    color: #A3A8B0;
}

@media (max-width: 1024px) {
    .portal-map-layout,
    .portal-about,
    .portal-contacts {
        grid-template-columns: 1fr;
    }

    .portal-news-grid,
    .portal-steps {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .portal-section {
        padding: 48px 0;
    }

    .portal-section__head h2 {
        font-size: 1.6em;
    }

    .portal-map-canvas {
        min-height: 420px;
        height: 50vh;
        border-radius: 12px;
    }

    .portal-news-grid,
    .portal-steps {
        grid-template-columns: 1fr;
    }

    .portal-contacts__grid {
        grid-template-columns: 1fr;
    }

    .portal-messages {
        left: 14px;
        right: 14px;
        max-width: none;
    }
}


/* Модальное окно заявки на публичном портале */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    padding: 20px;
    align-items: center;
    justify-content: center;
    background: rgba(6, 7, 9, .78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.modal-content {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #E4E6EA;
}

.modal-header h3 {
    margin: 0;
    color: #121317;
    font-size: 1.1em;
}

.modal-body {
    padding: 18px 20px 22px;
}

.close-btn {
    padding: 0;
    border: none;
    background: transparent;
    color: #5E646D;
    font-size: 1.6em;
    line-height: 1;
    cursor: pointer;
}

body.dark-theme .modal-content {
    background: #171A1F;
}

body.dark-theme .modal-header {
    border-bottom-color: #2A2E34;
}

body.dark-theme .modal-header h3 {
    color: #FFFFFF;
}
