/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* ===== VARIABLES ===== */
:root {
    --blue: #0b2b5e;
    --green: #168344;
    --red: #d93434;
    --bg: #f1f5fa;
    --light: #edf3fa;
    --text: #14253d;
}

/* ===== BODY ===== */
body {
    background: var(--bg);
    color: var(--text);
    padding: 20px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: auto;
    background: white;
    padding: 35px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .08);
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 30px;
    color: var(--blue);
}

.logo span {
    font-size: 13px;
    background: #e8f0fa;
    padding: 5px 12px;
    border-radius: 20px;
}

.account {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-status {
    background: #e8f5ee;
    color: var(--green);
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-status a {
    color: var(--blue);
    text-decoration: none;
}

.account button {
    border: 0;
    background: var(--blue);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
}

/* ===== INTRO ===== */
.intro {
    background: #edf4fc;
    padding: 25px;
    border-radius: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.intro h2 {
    color: var(--blue);
    margin-bottom: 10px;
}

.intro p {
    color: #52677f;
}

.badge {
    background: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 600;
}

/* ===== CAMERA ===== */
.camera-select {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.camera-button {
    border: 0;
    background: var(--blue);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
}

.camera-button small {
    opacity: .7;
}

.camera-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #101c2c;
    border-radius: 30px;
    overflow: hidden;
    cursor: pointer;
}

.camera-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 70%, rgba(0, 0, 0, .4));
    pointer-events: none;
}

.camera-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: .4s;
}

.camera-loading {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    gap: 15px;
    z-index: 2;
}

.loader {
    width: 45px;
    height: 45px;
    border: 4px solid #ffffff55;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.live {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--red);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    z-index: 3;
}

.live span {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
    margin-right: 6px;
}

.camera-name {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: #0008;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    z-index: 3;
}

.zoom-hint {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    opacity: .7;
    z-index: 3;
}

.parking-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #0008;
    color: white;
    padding: 10px 18px;
    border-radius: 20px;
    z-index: 3;
}

.parking-info strong {
    color: #4cff88;
}

/* ===== ADS ===== */
.ads {
    margin-top: 35px;
}

.ads-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ads-header button {
    border: 0;
    background: var(--light);
    color: var(--blue);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ===== AD CARD ===== */
.ad-card {
    position: relative; /* ← только здесь, чтобы контролировать дочерние absolute */
    background: white;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid #e5edf6;
    transition: .25s;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, .08);
}

.ad-image {
    height: 130px;
    background: #eaf2fb;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 45px;
}

.ad-image img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.ad-card div:last-child {
    padding: 20px;
}

.ad-card h4 {
    color: var(--blue);
}

.ad-card p {
    color: #63778d;
    margin: 10px 0;
}

.ad-card a {
    color: var(--blue);
    font-weight: bold;
}

/* ===== AD CONTROLS — ВСЁ РАБОТАЕТ ===== */
.ad-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.edit-ad,
.delete-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    color: white;
    cursor: pointer;
    padding: 0;
}

.edit-ad {
    background: var(--blue);
}

.delete-ad {
    background: var(--red);
}

/* ===== ADMIN PANEL ===== */
.ads-admin {
    background: #f5f8fc;
    padding: 20px;
    border-radius: 25px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.ads-admin input {
    border: 1px solid #dce5ef;
    border-radius: 20px;
    padding: 12px;
    flex: 1;
    min-width: 150px;
}

.ads-admin button {
    background: var(--blue);
    color: white;
    border: 0;
    border-radius: 20px;
    padding: 12px 25px;
    cursor: pointer;
}

/* ===== EDIT WINDOW ===== */
.edit-window {
    position: fixed;
    inset: 0;
    background: #0008;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.edit-window.active {
    display: flex;
}

.edit-box {
    background: white;
    border-radius: 30px;
    padding: 30px;
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-box input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 15px;
}

.edit-box button {
    padding: 12px;
    border: 0;
    border-radius: 20px;
    cursor: pointer;
    background: var(--blue);
    color: white;
}

.edit-box #closeEdit {
    width: 40px;
    height: 40px;
    align-self: flex-end;
    background: #edf3fa;
    color: var(--blue);
}

/* ===== STATS ===== */
.stats {
    margin-top: 35px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stats div {
    text-align: center;
    background: #f7faff;
    padding: 25px;
    border-radius: 25px;
}

.stats i {
    font-size: 30px;
    color: var(--blue);
}

.stats strong {
    display: block;
    font-size: 30px;
    margin: 10px 0;
}

/* ===== ZOOM OVERLAY ===== */
.zoom-overlay {
    position: fixed;
    inset: 0;
    background: #000c;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.zoom-overlay.active {
    display: flex;
}

.zoom-overlay img {
    max-width: 95%;
    max-height: 90%;
    border-radius: 20px;
}

.zoom-overlay button {
    position: absolute;
    top: 25px;
    right: 30px;
    width: 45px;
    height: 45px;
    border: 0;
    border-radius: 50%;
    font-size: 25px;
    cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 800px) {
    .intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .ads-grid,
    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .ads-admin {
        flex-direction: column;
    }
}

@media (max-width: 500px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
        border-radius: 20px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .ads-grid,
    .stats {
        grid-template-columns: 1fr;
    }

    .camera-box {
        border-radius: 20px;
    }

    .zoom-hint {
        display: none;
    }
}
/* ===== АДМИН-КНОПКИ ===== */
.admin-btn {
    border: 0;
    background: #168344;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-btn:hover {
    background: #0f6a36;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 131, 68, 0.3);
}

.admin-btn i {
    font-size: 14px;
}

/* Мобильная адаптация */
@media (max-width: 500px) {
    .admin-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .admin-btn i {
        font-size: 11px;
    }
}

/* ===== КАРТА ===== */
.map-section {
    margin: 15px 0 20px 0;
}

.map-section h3 {
    color: var(--blue);
    font-size: 18px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-section h3 i {
    color: var(--green);
}

#selectedCameraInfo {
    transition: 0.3s;
}

#selectedCameraInfo strong {
    color: var(--blue);
}

/* Адаптация карты на мобильных */
@media (max-width: 500px) {
    #parkingMap {
        height: 250px !important;
        border-radius: 14px !important;
    }
    
    .map-section h3 {
        font-size: 15px;
    }
    
    #selectedCameraInfo {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Попап на карте */
.leaflet-popup-content {
    min-width: 180px !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
}

.leaflet-popup-content .cam-popup-title {
    font-weight: 600;
    color: #0b2b5e;
    font-size: 16px;
    margin-bottom: 5px;
}

.leaflet-popup-content .cam-popup-status {
    font-size: 13px;
    color: #168344;
}

.leaflet-popup-content .cam-popup-btn {
    margin-top: 8px;
    padding: 5px 16px;
    border: 0;
    border-radius: 12px;
    background: #0b2b5e;
    color: white;
    cursor: pointer;
    font-size: 13px;
    width: 100%;
    transition: 0.3s;
}

.leaflet-popup-content .cam-popup-btn:hover {
    background: #1a3f72;
}

/* Кастомный маркер */
.custom-marker {
    background: #0b2b5e;
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    border: 3px solid white;
    transform: rotate(-45deg);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.custom-marker i {
    transform: rotate(45deg);
    color: white;
    font-size: 14px;
}

.custom-marker.active {
    background: #168344;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(22, 131, 68, 0.5);
}

/* ===== АТРИБУЦИЯ OSM НА КАРТЕ ===== */
.map-attribution {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.92);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    color: #333;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(4px);
    transition: 0.3s;
    font-family: 'Segoe UI', Arial, sans-serif;
    letter-spacing: 0.3px;
}

.map-attribution a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.map-attribution a:hover {
    color: #0b2b5e;
    text-decoration: underline;
}

.map-attribution i {
    margin-right: 4px;
    font-size: 10px;
    color: #888;
}

/* Для мобильных */
@media (max-width: 500px) {
    .map-attribution {
        font-size: 9px;
        padding: 2px 8px;
        bottom: 6px;
        right: 6px;
        border-radius: 4px;
    }
}
/* ===== МАРКЕРЫ КАМЕР ===== */
.camera-marker {
    background: transparent;
    border: none;
}

.marker-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #0b2b5e;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: none;
}

.marker-dot i {
    color: white;
    font-size: 16px;
}

/* ===== ВЫБРАННЫЙ МАРКЕР (просто другой цвет) ===== */
.marker-dot.active {
    background: #168344;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(22, 131, 68, 0.4);
}

/* ===== ПРОМО-БЛОК "РЕКЛАМА ЗДЕСЬ" ===== */
.promo-block {
    background: linear-gradient(135deg, #f8f9fc 0%, #eef2f7 100%);
    border-radius: 24px;
    padding: 25px 30px;
    margin: 30px 0 25px 0;
    border: 2px dashed #d0d9e6;
    position: relative;
    transition: 0.3s;
}

.promo-block:hover {
    border-color: #0b2b5e;
    background: linear-gradient(135deg, #f0f4fe 0%, #e4ebf7 100%);
}

.promo-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

/* Иконка с рупором */
.promo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0b2b5e, #1a3f72);
    border-radius: 50%;
    flex-shrink: 0;
}

.promo-icon i {
    font-size: 28px;
    color: white;
}

/* Текст */
.promo-text {
    flex: 1;
    min-width: 180px;
}

.promo-text h3 {
    color: #0b2b5e;
    font-size: clamp(18px, 2.5vw, 24px);
    margin-bottom: 4px;
}

.promo-text p {
    color: #63778d;
    font-size: clamp(14px, 1.5vw, 16px);
    margin: 0;
}

/* Контакты */
.promo-contacts {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.promo-label {
    color: #63778d;
    font-size: 14px;
    font-weight: 500;
}

/* ===== СОЦИАЛЬНЫЕ КНОПКИ ===== */
.social-links {
    display: flex;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 22px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.social-btn:active {
    transform: scale(0.95);
}

/* Цвета соцсетей */
.social-btn.telegram {
    background: linear-gradient(135deg, #0088cc, #00a2e8);
}

.social-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.social-btn.vk {
    background: linear-gradient(135deg, #4a76a8, #2c5786);
}

/* ===== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .promo-block {
        padding: 20px;
        margin: 20px 0;
        border-radius: 18px;
    }
    
    .promo-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .promo-icon {
        width: 50px;
        height: 50px;
    }
    
    .promo-icon i {
        font-size: 22px;
    }
    
    .promo-contacts {
        justify-content: center;
        width: 100%;
    }
    
    .social-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

@media (max-width: 400px) {
    .promo-block {
        padding: 15px;
        margin: 15px 0;
        border-radius: 14px;
    }
    
    .promo-text h3 {
        font-size: 16px;
    }
    
    .promo-text p {
        font-size: 13px;
    }
    
    .promo-label {
        font-size: 12px;
        width: 100%;
    }
    
    .social-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    margin-top: 40px;
    padding-top: 35px;
    border-top: 2px solid #e5edf6;
    background: linear-gradient(135deg, #f8faff 0%, #eef3f9 100%);
    border-radius: 24px;
    padding: 30px 30px 25px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Левая колонка ===== */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-logo {
    font-size: 26px;
    font-weight: 700;
    color: #0b2b5e;
    letter-spacing: -0.5px;
}

.footer-description {
    color: #63778d;
    font-size: 14px;
    line-height: 1.6;
    max-width: 350px;
}

.footer-copyright {
    color: #8a9bb0;
    font-size: 12px;
    margin-top: 5px;
}

/* ===== Правая колонка (ссылки) ===== */
.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.footer-column h4 {
    color: #0b2b5e;
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-column ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4a5a70;
}

.footer-column ul li i {
    color: #0b2b5e;
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.footer-column ul li a {
    color: #4a5a70;
    text-decoration: none;
    transition: 0.3s;
}

.footer-column ul li a:hover {
    color: #0b2b5e;
}

.footer-column ul li span {
    color: #4a5a70;
}

/* ===== Соцсети в футере ===== */
.footer-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
}

.footer-social:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.footer-social.telegram {
    background: linear-gradient(135deg, #0088cc, #00a2e8);
}

.footer-social.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.footer-social.vk {
    background: linear-gradient(135deg, #4a76a8, #2c5786);
}

.footer-social.youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
}

/* ============================================================
   АДАПТАЦИЯ
   ============================================================ */

@media (max-width: 768px) {
    .footer {
        padding: 20px 16px 18px 16px;
        margin-top: 25px;
        border-radius: 18px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-description {
        max-width: 100%;
        margin: 0 auto;
    }

    .footer-logo {
        font-size: 22px;
    }

    .footer-column h4 {
        text-align: center;
    }

    .footer-column ul li {
        justify-content: center;
        font-size: 13px;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-social {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .footer-copyright {
        text-align: center;
    }
}

@media (max-width: 400px) {
    .footer {
        padding: 15px 12px 14px 12px;
        margin-top: 20px;
        border-radius: 14px;
    }

    .footer-logo {
        font-size: 19px;
    }

    .footer-description {
        font-size: 12px;
    }

    .footer-column ul li {
        font-size: 12px;
        gap: 8px;
    }

    .footer-social {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .footer-copyright {
        font-size: 10px;
    }
}
/* ============================================================
   ГРАДИЕНТНАЯ ПОЛОСКА-РАЗДЕЛИТЕЛЬ
   ============================================================ */

.section-divider-gradient {
    height: 3px;
    margin: 30px 0 25px 0;
    background: linear-gradient(to right, 
        transparent 0%, 
        #e5edf6 15%, 
        #0b2b5e 50%, 
        #e5edf6 85%, 
        transparent 100%
    );
    border-radius: 3px;
    opacity: 0.6;
    transition: 0.4s;
}

.section-divider-gradient:hover {
    opacity: 1;
    height: 4px;
    background: linear-gradient(to right, 
        transparent 0%, 
        #0b2b5e 30%, 
        #168344 50%, 
        #0b2b5e 70%, 
        transparent 100%
    );
}

@media (max-width: 600px) {
    .section-divider-gradient {
        margin: 20px 0 18px 0;
        height: 2px;
    }
}
/* ============================================================
   ZOOM OVERLAY — ПОВЕРХ ЛЮБОЙ КАРТЫ
   ============================================================ */

.zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* ← МАКСИМАЛЬНЫЙ ПРИОРИТЕТ */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.zoom-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.zoom-overlay img {
    max-width: 95%;
    max-height: 90%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.zoom-overlay button {
    position: absolute;
    top: 25px;
    right: 30px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transition: 0.3s;
    z-index: 1000000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.zoom-overlay button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ===== КАРТА — НЕ ДОЛЖНА ПЕРЕКРЫВАТЬ ===== */
#parkingMap {
    position: relative;
    z-index: 1;
}

.leaflet-control-container {
    position: relative;
    z-index: 2;
}

.leaflet-popup {
    z-index: 100 !important;
}

/* ============================================================
   КНИГА ЖАЛОБ И ПРЕДЛОЖЕНИЙ
   ============================================================ */

/* ===== ПЛАВАЮЩАЯ КНОПКА-КРУЖОК ===== */
.feedback-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0b2b5e, #1a3f72);
    color: white;
    border: none;
    box-shadow: 0 8px 30px rgba(11, 43, 94, 0.4);
    cursor: pointer;
    z-index: 9999;
    font-size: 26px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(11, 43, 94, 0.5);
}

.feedback-float-btn:active {
    transform: scale(0.95);
}

/* Бейджик с количеством непрочитанных */
.feedback-float-btn .feedback-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #d93434;
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid white;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.feedback-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    padding: 20px;
}

.feedback-modal.active {
    display: flex;
}

.feedback-modal-content {
    background: white;
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: feedbackSlideUp 0.3s ease;
}

@keyframes feedbackSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== HEADER ===== */
.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #e5edf6;
    background: #f7faff;
}

.feedback-modal-header h3 {
    font-size: 18px;
    color: #0b2b5e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-modal-header h3 i {
    color: #0b2b5e;
}

.feedback-modal-header button {
    background: none;
    border: none;
    font-size: 22px;
    color: #8a9bb0;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: 0.3s;
}

.feedback-modal-header button:hover {
    background: #edf3fa;
    color: #0b2b5e;
}

/* ===== BODY ===== */
.feedback-modal-body {
    padding: 24px;
}

/* Категории */
.feedback-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.feedback-cat {
    padding: 10px 12px;
    border: 2px solid #e5edf6;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #63778d;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.feedback-cat:hover {
    border-color: #b8c8dd;
}

.feedback-cat.active {
    border-color: #0b2b5e;
    background: #edf3fa;
    color: #0b2b5e;
}

.feedback-cat i {
    font-size: 16px;
}

/* Текстовое поле */
.feedback-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    border: 2px solid #e5edf6;
    border-radius: 14px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: 0.3s;
    outline: none;
    color: #14253d;
}

.feedback-form textarea:focus {
    border-color: #0b2b5e;
    box-shadow: 0 0 0 4px rgba(11, 43, 94, 0.1);
}

.feedback-form textarea::placeholder {
    color: #a8b8cc;
}

.feedback-char-counter {
    text-align: right;
    font-size: 12px;
    color: #a8b8cc;
    margin-top: 6px;
}

.feedback-char-counter .over {
    color: #d93434;
}

/* Успех */
.feedback-success {
    text-align: center;
    padding: 30px 20px;
}

.feedback-success i {
    font-size: 48px;
    color: #168344;
    margin-bottom: 12px;
}

.feedback-success p {
    font-size: 16px;
    color: #14253d;
    font-weight: 500;
}

/* ===== FOOTER ===== */
.feedback-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5edf6;
    background: #f7faff;
}

.feedback-modal-footer button {
    padding: 10px 24px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
}

.feedback-modal-footer #feedbackCancelBtn {
    background: transparent;
    color: #63778d;
}

.feedback-modal-footer #feedbackCancelBtn:hover {
    background: #edf3fa;
}

.feedback-modal-footer .feedback-send-btn {
    background: #0b2b5e;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-modal-footer .feedback-send-btn:hover {
    background: #1a3f72;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 43, 94, 0.3);
}

.feedback-modal-footer .feedback-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================================
   АДАПТАЦИЯ
   ============================================================ */

@media (max-width: 600px) {
    .feedback-float-btn {
        width: 54px;
        height: 54px;
        font-size: 22px;
        bottom: 20px;
        right: 20px;
    }
    
    .feedback-modal-content {
        max-width: 100%;
        border-radius: 20px;
        margin: 10px;
    }
    
    .feedback-modal-header h3 {
        font-size: 16px;
    }
    
    .feedback-categories {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .feedback-cat {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .feedback-modal-footer button {
        padding: 8px 18px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .feedback-categories {
        grid-template-columns: 1fr 1fr;
    }
    
    .feedback-modal-body {
        padding: 16px;
    }
    
    .feedback-modal-header {
        padding: 14px 16px;
    }
    
    .feedback-modal-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    .feedback-modal-footer button {
        flex: 1;
        justify-content: center;
    }
}

/* ===== МОДАЛЬНОЕ ОКНО РЕДАКТИРОВАНИЯ ===== */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

.edit-modal.active {
    display: flex;
}

.edit-modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 520px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: slideUpModal 0.3s ease;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.edit-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.edit-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0b2b5e;
}

.edit-modal-header h3 i {
    color: #0b2b5e;
    margin-right: 10px;
}

.edit-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0 8px;
    border-radius: 8px;
    transition: 0.2s;
    line-height: 1;
}

.edit-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.edit-modal-body {
    padding: 24px;
}

.edit-form-group {
    margin-bottom: 18px;
}

.edit-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.edit-form-group .required {
    color: #d93434;
}

.edit-form-group input,
.edit-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e4ea;
    border-radius: 12px;
    font-size: 14px;
    transition: 0.25s;
    font-family: inherit;
    box-sizing: border-box;
    background: #fafbfc;
}

.edit-form-group input:focus,
.edit-form-group textarea:focus {
    outline: none;
    border-color: #0b2b5e;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(11, 43, 94, 0.08);
}

.edit-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.edit-form-group input[type="file"] {
    padding: 10px 12px;
    background: #fafbfc;
    border: 2px dashed #d0d5dd;
    cursor: pointer;
}

.edit-form-group input[type="file"]:hover {
    border-color: #0b2b5e;
    background: #f5f8ff;
}

.edit-modal-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid #eef2f6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-modal-btn {
    padding: 10px 28px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-modal-btn.cancel {
    background: #f0f2f5;
    color: #555;
}

.edit-modal-btn.cancel:hover {
    background: #e4e7ed;
}

.edit-modal-btn.save {
    background: #0b2b5e;
    color: white;
}

.edit-modal-btn.save:hover {
    background: #163a77;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(11, 43, 94, 0.3);
}

.edit-modal-btn.save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#editCurrentImagePreview {
    display: none;
}

#editCurrentImagePreview.has-image {
    display: block;
}

/* ===== МОДАЛЬНОЕ ОКНО СОЗДАНИЯ ===== */
.create-modal .edit-modal-header h3 i {
    color: #168344 !important;
}

.create-btn {
    background: #168344 !important;
}

.create-btn:hover {
    background: #1a9e4f !important;
    box-shadow: 0 4px 15px rgba(22, 131, 68, 0.3) !important;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #d0d5dd;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s ease;
    background: #fafbfc;
    position: relative;
}

.drop-zone:hover {
    border-color: #0b2b5e;
    background: #f5f8ff;
}

.drop-zone.dragover {
    border-color: #168344;
    background: #e8f5ee;
    transform: scale(1.01);
}

.drop-zone-content p {
    margin: 8px 0 4px;
    color: #0b2b5e;
    font-size: 15px;
}

.drop-zone-content small {
    color: #999;
    font-size: 12px;
}

.drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Анимация для превью */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#createImagePreview {
    animation: fadeSlideIn 0.25s ease;
}

/* Адаптив */
@media (max-width: 576px) {
    .edit-modal-content.create-modal {
        max-width: 100%;
        width: 96%;
        margin: 10px;
    }
    
    .drop-zone {
        padding: 20px 12px;
    }
    
    .drop-zone-content i {
        font-size: 24px !important;
    }
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== АККАУНТ (правый блок) ===== */
.account {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;  /* ← ВЫРАВНИВАНИЕ ВЛЕВО */
}

/* ===== СТАТУС ПОЛЬЗОВАТЕЛЯ ===== */
.user-status {
    background: #e8f5ee;
    color: var(--green);
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    white-space: nowrap;
}

.user-status a {
    color: var(--blue);
    text-decoration: none;
}

/* ===== ОБЩИЕ СТИЛИ ДЛЯ КНОПОК В ШАПКЕ ===== */
.account button,
.account .admin-btn,
.account .super-admin-btn,
.account .logout-btn-header {
    border: 0;
    padding: 10px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: inherit;
}



/* ===== СУПЕРАДМИН-КНОПКА ===== */


.account .super-admin-btn i {
    color: #ffd700;
}

/* ===== КНОПКА ВЫХОДА ===== */
.account .logout-btn-header {
    background: rgba(217, 52, 52, 0.12);
    color: #d93434;
}

.account .logout-btn-header:hover {
    background: rgba(217, 52, 52, 0.2);
    transform: translateY(-2px);
}

/* ============================================================
   АДАПТАЦИЯ ДЛЯ ПЛАНШЕТОВ
   ============================================================ */

@media (max-width: 992px) {

    .account button,
    .account .admin-btn,
    .account .super-admin-btn,
    .account .logout-btn-header {
        padding: 9px 18px;
        font-size: 14px;
    }
}

/* ============================================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ (ТЕЛЕФОНЫ)
   ============================================================ */

@media (max-width: 768px) {
    .header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }
    

    
    .account {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-start;  /* ← ВЫРАВНИВАНИЕ ВЛЕВО */
        flex: 1;
    }
    
    .user-status {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .account button,
    .account .admin-btn,
    .account .super-admin-btn,
    .account .logout-btn-header {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: flex-start;  /* ← ВСЁ ВЛЕВО */
        gap: 10px;
    }
    

    
    .account {
        justify-content: flex-start;  /* ← ВЫРАВНИВАНИЕ ВЛЕВО */
        gap: 8px;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .user-status {
        font-size: 14px;
        padding: 8px 16px;
        width: auto;
        justify-content: flex-start;
    }
    
    .account button,
    .account .admin-btn,
    .account .super-admin-btn,
    .account .logout-btn-header {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 80px;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    
    .user-status {
        font-size: 13px;
        padding: 6px 14px;
    }
    
    .account button,
    .account .admin-btn,
    .account .super-admin-btn,
    .account .logout-btn-header {
        padding: 7px 12px;
        font-size: 12px;
        min-width: 70px;
        gap: 5px;
    }
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.logo h1 {
    font-size: 26px;
    color: var(--blue);
    margin: 0;
    white-space: nowrap;
}

.logo h1 span {
    font-size: 12px;
    background: #e8f0fa;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 6px;
}

@media (max-width: 576px) {
    .logo-img {
        height: 60px;
    }
    
    .logo h1 {
        font-size: 26px;
    }
    
    .logo h1 span {
        font-size: 10px;
        padding: 2px 8px;
    }
}
/* ===== КНОПКИ В ШАПКЕ ===== */
.header-btn {
    border: none;
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    background: #0b2b5e;
    color: white;
}

.header-btn:hover {
    background: #163a77;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 43, 94, 0.3);
}

.header-btn:active {
    transform: scale(0.95);
}

/* Если нужны разные цвета для разных кнопок — раскомментируйте */
/*
.admin-btn {
    background: #0b2b5e;
}

.super-admin-btn {
    background: #0b2b5e;
}

.logout-btn {
    background: #0b2b5e;
}
*/

/* Адаптация для мобильных */
@media (max-width: 576px) {
    .header-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .header-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* ===== СЕКТОР ОБЗОРА КАМЕРЫ ===== */
.camera-sector {
    pointer-events: none !important;
    transition: opacity 0.3s ease;
}

.camera-direction {
    pointer-events: none !important;
    transition: opacity 0.3s ease;
}

/* При наведении на маркер — подсвечиваем сектор */
.camera-marker:hover + .camera-sector {
    opacity: 1 !important;
}