* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7f5;
    color: #1f2933;
}

header {
    height: 72px;
    background: linear-gradient(135deg, #064e3b, #047857);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
    
}

/* ez a budaörsi felirat a kép mellett*/
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    color: white;
    font-size: 24px;
    font-weight: 700;
}

.logo img{
    width:48px;
    height:48px;
    border-radius:8px;
    background:white;
    padding:4px;
    box-shadow:0 2px 8px rgba(0,0,0,.2);
}


.subtitle {
    font-size: 14px;
    opacity: 0.9;
    text-align: right;
}

#app {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    width: 100%;
}

#map {
    width: 100%;
    min-width: 0;
    height: calc(100vh - 68px);
}

aside {
    background: white;
    padding: 22px;
    overflow-y: auto;
    box-shadow: 0 0 18px rgba(0,0,0,0.12);
    z-index: 1000;
}

h2 {
    margin-top: 0;
    font-size: 22px;
}

.help {
    color: #5b6770;
    font-size: 14px;
}

label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    font-size: 15px;
}

textarea {
    resize: vertical;
}

button {
    width: 100%;
    margin-top: 20px;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: #047857;
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #065f46;
}

.coords {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    background: #ecfdf5;
    font-size: 13px;
}

.selected-hint {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.report-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
    cursor: pointer;
}

.report-item:hover {
    background: #f9fafb;
}

.report-title {
    font-weight: bold;
}

.report-meta {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.popup-card {
    width: 230px;
}

.popup-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 8px;
}

.delete-btn {
    background: #dc2626;
}

.delete-btn:hover {
    background: #b91c1c;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 5000;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
}

#closeModal {
    position: absolute;
    top: 24px;
    right: 34px;
    color: white;
    font-size: 42px;
    cursor: pointer;
}

.mobile-upload {
    display: none;
}

.file-name {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.photo-btn {
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    background: #047857;
    color: white;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
}

#formPanel h2 {
    font-size: 18px;
}

#formPanel .help,
#formPanel label,
#formPanel .coords {
    font-size: 12px;
}

#formPanel input,
#formPanel select,
#formPanel textarea,
#formPanel button {
    font-size: 13px;
    padding: 9px;
}

/* Asztali gépen normál fájlválasztó */
.desktop-upload {
    display: block;
}

.mobile-upload {
    display: none;
}

/* Telefonon csak a Fotó készítése gomb látszik */



@media (max-width: 900px) {
    header {
        height: auto;
        min-height: 64px;
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .logo span {
        font-size: 20px;
    }

    .logo img {
        width: 40px;
        height: 40px;
    }

    .subtitle {
        text-align: left;
        font-size: 12px;
    }

    #app {
        display: flex;
        flex-direction: column;
        height: auto;
    }

    #formPanel {
        order: 1;
    }

    #map {
        order: 2;
        height: 60vh;
        min-height: 420px;
    }

    #listPanel {
        order: 3;
    }

    aside {
        box-shadow: none;
        padding: 16px;
    }

    .desktop-upload {
        display: none;
    }

    .mobile-upload {
        display: block;
    }
    .desktop-upload {
        display: none !important;
    }

    .mobile-upload {
        display: block !important;
    }

    #imageFile {
        display: none !important;
    }
}


/* Asztali feltöltő alapból látható */
.desktop-upload {
    display: block;
}

/* Mobilos gombok alapból rejtve */
.mobile-upload,
.mobile-file-input {
    display: none;
}

.photo-btn,
.gallery-btn {
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    color: white;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
}

.photo-btn {
    background: #047857;
}

.gallery-btn {
    background: #0f766e;
}

.file-name {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

@media (max-width: 900px) {
    .desktop-upload {
        display: none !important;
    }

    .mobile-upload {
        display: block !important;
    }

    .mobile-file-input {
        display: none !important;
    }
}