body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
    background-color: #F0F0F0;
}

.header {
    width: 100%;
    background-color: #FFFFFF;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    height: 80px;
    position: relative;
    flex-shrink: 0; 
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
    position: relative;
    height: 100%;
}

.line2 {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #39693C;
    font-size: 14px;
    font-weight: bold;
}

.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.logo {
    width: 150px;
    height: auto;
    object-fit: contain;
}

.map-container {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
}

#map {
    height: 100%;
    width: 100%;
}

.button-container {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-button {
    padding: 10px 20px;
    background-color: #39693C;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.5s ease;
    margin: 0;
}

.custom-button:hover {
    background-color: #2a4e2c;
}

.custom-button.hidden {
    display: none;
}

#install-button-container {
    position: absolute;
    top: 10px;
    left: 20px; /* <-- A chave é usar 'left' em vez de 'right' */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#loadGeojson, #navButton, #installAppButton {
    position: relative;
}

#legend {
    position: absolute;
    bottom: 20px;
    left: 10px;
    z-index: 1000;
    background: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #D5E8D0;
    max-width: 250px;
    transition: all 0.3s ease; 
}

.auto-center-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: white;
    color: #39693C;
    border: 1px solid #D5E8D0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.auto-center-button:hover {
    background-color: #D5E8D0;
}

.auto-center-button.active {
    background-color: #39693C;
    color: white;
}

.position-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
    border: 1px solid #D5E8D0;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
}

.position-indicator.has-value {
    color: #39693C;
    font-weight: bold;
}

.exit-confirmation-modal, .edit-value-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.exit-confirmation-modal .modal-content, .edit-value-modal .modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: 340px;
    max-width: 90%;
    text-align: center;
}

.exit-confirmation-modal h3, .edit-value-modal h3 {
    color: #39693C;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.exit-confirmation-modal p {
    margin-bottom: 20px;
    color: #666;
}

.exit-confirmation-modal .modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.exit-confirmation-modal .modal-buttons .custom-button {
    width: 100%;
    padding: 12px;
    margin: 0;
    font-size: 14px;
}

.exit-confirmation-modal .save-button { background-color: #39693C; }
.exit-confirmation-modal .exit-button { background-color: #dc3545; }
.exit-confirmation-modal .cancel-button { background-color: #6c757d; }

.legend-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.legend-header b { margin-bottom: 0; line-height: 1.2; }

.legend-collapse-button {
    cursor: pointer;
    font-size: 25px;
    border: none;
    background: none;
    padding: 0;
    margin-left: 30px;
    color: #39693C;
}
.legend-collapse-button:hover { color: #2a4e2c; }

.legend-items-container {
    padding-bottom: 3px;
}

.legend-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 3px;
}

#legend-edit-btn {
    cursor: pointer;
    font-size: 18px;
    color: #39693C;
    border: none;
    background: none;
    padding: 0;
}
#legend-edit-btn:hover { color: #2a4e2c; }

.legend-item { display: flex; align-items: center; margin-bottom: 4px; }
.legend-item i { width: 15px; height: 15px; display: inline-block; margin-right: 5px; flex-shrink: 0; }
.legend-item-edit-icon { cursor: pointer; font-size: 16px; color: #6c757d; margin-left: 8px; display: none; }
.legend-item-edit-icon:hover { color: #343a40; }
#legend.editing .legend-item-edit-icon { display: inline-block; }
.edit-value-modal input { width: 100%; padding: 10px; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 16px; }
.edit-value-modal .modal-buttons { display: flex; justify-content: space-around; gap: 10px; }

#legend.collapsed {
    width: auto;
    height: auto;
    padding: 7px;
}
#legend.collapsed .legend-header {
    margin-bottom: 0;
}
#legend.collapsed .legend-header b,
#legend.collapsed .legend-items-container,
#legend.collapsed .legend-footer {
    display: none;
}

#legend.collapsed .legend-collapse-button {
    font-size: 33px;
    line-height: 1;
	margin-left: 3px;
}

.format-toggle-container.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.format-toggle-container.disabled .format-label {
    color: #ccc !important;
}

.format-toggle-container.offline .label-shp {
    text-decoration: line-through;
}

@media (max-width: 600px) {
    .header {
        height: 60px;
        padding: 5px 10px;
    }

    .logo {
        width: 120px;
    }

    .line2 {
        top: 10px;
        right: 10px;
    }

    .button-container {
        top: 60px; 
        right: 10px; 
    }
				
    #install-button-container {
        top: 60px;
        left: 10px;
    }				
				
    .button-container .custom-button {
        padding: 8px 12px;
        font-size: 14px;
    }

    .position-indicator {
        font-size: 14px;
        min-width: 140px;
        padding: 8px 15px;
    }

    #legend, .auto-center-button {
        bottom: 10px;
    }
    
    #legend {
        left: 10px;
    }
    
    .auto-center-button {
        right: 10px;
    }

}


.install-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.install-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.install-modal-content {
    background-color: white;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    width: 360px;
    max-width: 90%;
    text-align: center;
}

.install-modal-content h3 {
    color: #39693C;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
}

.install-modal-content p {
    margin-bottom: 20px;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

.install-modal-content .ios-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin: 0 4px;
    position: relative;
    top: -2px;
}

.install-modal-content .share-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5L12 17"/><path d="M9 8L12 5L15 8"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/></svg>');
}

.install-modal-content .add-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><line x1="12" y1="8" x2="12" y2="16"/><line x1="8" y1="12" x2="16" y2="12"/></svg>');
}

.install-modal-content .close-modal-btn {
    margin-top: 15px;
    background-color: #6c757d;
}

.custom-button:disabled {
    background-color: #aeb8af; /* Uma cor mais neutra/cinza */
    opacity: 0.6; /* Reduz a opacidade */
    cursor: not-allowed; /* Muda o cursor para indicar que não é clicável */
}

.custom-button:disabled:hover {
    background-color: #aeb8af; /* Garante que a cor não mude no hover */
}

#app-version-display {
    position: relative;
    top: 12px;           
    left: 20px;         
}

/* ===== ESTILOS DE LOGIN ===== */

.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.login-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-modal-content {
    background-color: white;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    width: 420px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 60px;
    height: auto;
    margin: 0 auto 15px auto;
    display: block;
    opacity: 0.9;
}

.login-header h2 {
    color: #39693C;
    margin: 0 0 8px 0;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0 0 8px 0;
    font-weight: 400;
}

.login-info {
    color: #888;
    font-size: 13px;
    margin: 0;
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.form-group-spaced {
    margin-top: 20px;
    margin-bottom: 8px;
}

.form-group label {
    color: #333;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
}

.form-group input {
    padding: 13px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #fafafa;
    color: #333;
}

.form-group input:focus {
    outline: none;
    border-color: #39693C;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(57, 105, 60, 0.1);
}

.form-group input::placeholder {
    color: #999;
    font-size: 14px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.toggle-password:hover {
    color: #39693C;
    background-color: rgba(57, 105, 60, 0.05);
}

.toggle-password:active {
    transform: scale(0.95);
}

.eye-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    border: 1px solid #fcc;
    margin-top: 8px;
    line-height: 1.5;
}

.error-message.hidden {
    display: none;
}

.login-button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    border-radius: 8px;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(57, 105, 60, 0.3);
}

.login-button .button-loader {
    display: inline-block;
}

.login-button .button-loader.hidden {
    display: none;
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    text-align: center;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.login-divider span {
    padding: 0 15px;
    color: #888;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-login-button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 500;
    background-color: #4285f4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
}

.social-login-button:hover {
    background-color: #357ae8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.social-icon {
    font-size: 20px;
}

/* Modal de Instruções para Login Social */
.instructions-content {
    width: 600px;
    max-width: 95%;
    position: relative;
}

.close-instructions {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.close-instructions:hover {
    color: #333;
}

.instructions-header {
    text-align: center;
    margin-bottom: 30px;
    padding-right: 40px;
}

.instructions-header h2 {
    color: #39693C;
    margin: 0 0 10px 0;
    font-size: 22px;
}

.instructions-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.instructions-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.instruction-step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background-color: #39693C;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.step-content {
    flex: 1;
}

.step-content p {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 15px;
}

.step-content p strong {
    color: #39693C;
}

.step-detail {
    color: #666 !important;
    font-size: 13px !important;
    font-style: italic;
}

.step-link {
    display: inline-block;
    color: #4285f4;
    text-decoration: none;
    font-size: 14px;
    margin-top: 5px;
    transition: color 0.3s ease;
}

.step-link:hover {
    color: #357ae8;
    text-decoration: underline;
}

.understood-button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
}

/* Responsividade para modais de login */
@media (max-width: 600px) {
    .login-modal-content {
        padding: 25px 20px;
        width: 95%;
    }

    .login-logo {
        width: 50px;
        margin-bottom: 12px;
    }

    .login-header h2 {
        font-size: 22px;
    }

    .login-header {
        margin-bottom: 25px;
    }

    .instructions-content {
        width: 95%;
        padding: 20px;
    }

    .instructions-header {
        padding-right: 0;
    }

    .close-instructions {
        top: 10px;
        right: 10px;
    }

    .instruction-step {
        gap: 12px;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}


